• Resolved Damn!

    (@greedymind)


    I have a scenario where I need to use the value of a field from form 1 into a calculation in form 2. Both forms are in the same page. I tried using fieldname17_1 in the 2nd form but nothing happens.
    Is there any other way to achieve this?

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello,

    I’ll assume in my example you need to implement the equation: fieldname17 in the first form + the fieldname123 in the second form, and the calculated field is in the second form. There are multiple alternatives, I will explain one of them.

    1. Assign a class name to the field in the first form, to allow insert this form as the second, third or fourth form in the page without affecting the code, for example: my-external-field

    2. Insert a hidden field in the second form, for example: fieldname345, with the class name: my-auxiliary-field

    3. Insert a HTML content field in the second form with the piece of code:

    <script>
    jQuery(document).on('change', '.my-external-field input', function(){
    jQuery('.my-auxiliary-field input').val(jQuery(this).val()).change();
    });
    </script>

    4. And finally, the equation to associate with the calculated field would be simply:

    fieldname123+fieldname345

    The process is simple, I have inserted an auxiliary field in the second form whose value is being update when the value of the field in the external form is modified, and then, I’m using the auxiliary field in the equations as usual.

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘“Connecting” Forms’ is closed to new replies.