• Resolved blue

    (@life2)


    Hi, I want to apply the option ‘Dynamically evaluate the equations associated with the calculated fields’ only to a specific calculated field, while all the remaining fields are calculated using a button. Is there a way to do this?

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

    (@codepeople)

    Hello @life2

    Thank you very much for using our plugin. The “Dynamically evaluate the equations associated with the calculated fields” attribute affects every equation in the form. By ticking the checkbox, the plugin evaluates every equation in the form dynamically. The alternative would be to untick the checkbox but evaluate the equation of the specific calculated field by coding.

    For example, assuming you have the equation: fieldname1+fieldname2 into the settings of the calculated field fieldname3, and you want to evaluate this equation every time the fields fiedname1 and fieldname2 vary their values. You can insert an “HTML Content” field in the form and enter a piece of code similar to the following one as its content:

    
    <script>
    jQuery(document).on('change', '[id*="fieldname1_"],[id*="fieldname2_"]', function(){
    EVALEQUATION(this.form, 'fieldname3');
    });
    </script>
    

    And that’s all. Every equation would be disabled until the calculate button is pressed except the equation defined into the fieldname3 that will be evaluated every time the user modifies the values of the fieldname1 or fieldname2 fields.

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘About dynamically evaluating the equations’ is closed to new replies.