Initial Filter Opportunity field by selected Account in Contracts module — SuiteCRM 8.8

I’d like to implement an initial filter
In the Contracts module, I have two relate fields:

  • Account
  • Opportunity

I want this behavior:
:white_check_mark: When I select an Account, and then click to choose an Opportunity, the Opportunity dropdown or popup should only show Opportunities related to the selected Account — not all Opportunities.

Could anyone please guide me on?

Hey
Since the Contracts module is running Legacy views you can use something like

   1 =>
        array(
          0 =>
          array(
            'name' => 'billing_contact',
            'label' => 'LBL_BILLING_CONTACT',
            'displayParams' =>
            array(
              'initial_filter' => '&account_name="+this.form.{$fields.billing_account.name}.value+"',
            ),
          ),
          1 => '',
        ),

For reference
This is the file that contains the code
public/legacy/modules/AOS_Invoices/metadata/editviewdefs.php