Support » Plugin: Calculated Fields Form » calculator results passed to different calculator same page

  • Resolved EliteWebServices

    (@elitewebservices)


    I need to be able to pass the results of a calculator to a number field of another calculator on the same page. I’ve read about this working on a different page (thank you) but need the same page.

    Will this work?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @elitewebservices,

    Actually it is very simple, assign an unique class name to the number field in the second form, for example: my-field

    and then, assuming the equation associated to the calculated field in the first form is for example: fieldname1+fieldname2, you simply should edit it as follows:

    
    (function(){
    var result = fieldname1+fieldname2;
    jQuery('.my-field input').val(result).change();
    return result;
    })()
    

    and that’s all. As you can see, I’m assigning the value to the field in the second form, and triggered the “change” event for evaluating the related equations in the second form.

    Best regards.

    EliteWebServices

    (@elitewebservices)

    And if I needed the result to be assigned to multiple fields?

    Plugin Author codepeople

    (@codepeople)

    Hello @elitewebservices,

    You simply should assign the custom class name: my-field to multiple fields.

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘calculator results passed to different calculator same page’ is closed to new replies.