• Resolved alevel

    (@alevel)


    Hi,

    I’m loading some external json-files (with actuarial factors) into global vars by script. I use these in several calculated fields. This works fine about half of the time. But sometimes CFF starts evaluating (showHideDepEvent fires) before the json files have all loaded. I want to make sure that CFF does not start evaluating equations until my json files are all loaded. But I do want to keep the dynamic evaluation once the json-data is there. How can I do this? Thanks!

    Best regards, Alex

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

    (@codepeople)

    Hello @alevel

    Thank you very much for using our plugin.

    If you are loading the JSON files by yourself and you want to evaluate the equations only after the files are loaded, you can configure the form as follows:

    1. Deactivate the dynamic evaluation of the equations by unticking the “Dynamically evaluate the equations associated with the calculated fields” checkbox in the “Form Settings” tab (https://resources.developers4web.com/cff/images/documentation/form-settings-tab.png)

    2. In the code that loads the JSON file, please, enter the following piece of code after loading the external information:

    
    var _form = jQuery('[id*="cp_calculatedfieldsf_pform_"]');
    _form.attr('data-evalequations',1);
    EVALEQUATIONS(_form);
    

    Best regards.

Viewing 1 replies (of 1 total)

The topic ‘Wait with form evaluations’ is closed to new replies.