How can I pick-up a value from an INPUT field with no user interaction?

Current set-up : SPA Pages, Windows 10, MySQL, PHP

I have a Modal with a dynamic list, this can obviously change.
The number of Items (1) is populated dynamically from the database.
A calculation is then done on the form fields in the Modal.
The number of Items (1) is then multiplied by the Item Cost (2) which then gives a Line Total (3).
The Line Totals are then added together (using item.sum) to give a Grand Total (4).

This part all works great.

The problem is when I want to take the Grand Total figure (4), close the Modal and use that figure in a form field on the opener page. I can’t do this unless the user makes an additional selection/deselection. But the user may not want to change this selection and so does not interact with the form in any way.

This was previously confirmed by Patrick when he said "'dmx-on:updated' is triggered after the input value changed, but ONLY if it was a user action, it doesn’t trigger when it was changed by code."

So, in the 'Save & Close' button I CANNOT use
'modal_form.modal_grand_total_field.setValue(base_form.grand_total_field.value)'
because the figure was put there programmatically and not by user interaction.

Does anybody have a solution to this?

Community Page
Last updated: