1
0
-1

Hello team.

I had to use two Ajax Form in a parent form. Each of the Ajax Form makes use of a calculated field to obtain a total, according to the information previously entered.

How can I make a calculated field in the parent form to get the sum of the calculated totals in each Ajax Form?

I need that when these two subtotals are updated the general grand total of the parent form is recalculated. For this case, It is necessary to use the Ajax forms because its content changes when changing the value of a select box in the header of the parent form.

Thank you very much for your help!

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi, I believe you can some custom javascript. Perhaps have an onchange listener on the textfield so that when it changes, it will retrieve the values of the subtotals to do the calculation. To retrieve the values you should be able to use Javascript API#getValue(fieldId). Since it is an ajax subform, you might need to introduce a timer delay to let the forms load before doing the calculation too.

        CommentAdd your comment...