Support » Plugin: Calculated Fields Form » a lot of forms on a page

  • Resolved khanehfitness

    (@khanehfitness)


    Hi
    First of all thanks for this great plugin and the generous amount of support you are presenting
    I have this webpage about food calories. I use CFF as a calorie and macro calculator for each food so in a single page i will be using too many forms on a single page (more than 100!) so loading the page takes a lot of time. I know this plugin is not intended to be used this way, but i want to know if there is a solution to speed up the loading or not

    Thanks in advance

    The page I need help with: [log in to see the link]

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

    (@codepeople)

    Hello @khanehfitness

    My recommendation in this case would be:

    1. Disable the dynamic evaluation of the equations, unticking the checkbox: “Eval dynamically the equations associated to the calculated fields” in the “Form settings” tab (https://cff.dwbooster.com/images/documentation/form-settings-tab.png).

    2. Now, you will need to include a button in the form to evaluate the equations manually. Insert a button in the form, and select as the button’s type (in its settings) the “Calculate” option.

    Best regards.

    Thanks for the answer
    is there a way to add a single calculate button for all the forms?

    Plugin Author codepeople

    (@codepeople)

    Hello,

    The buttons belong to the forms not to the page (the button’s scope is the form). An alternative, would be insert a button that walks every form, and evaluates their equations manually, but it is not the default behavior of the plugin.

    For example, insert a button with the following piece of code as its onclick event:

    
    jQuery('[id*="cp_calculatedfieldsf_pform"]').each(function(){fbuilderjQuery.fbuilder.calculator.defaultCalc('#'+this.id);});
    

    Best regards.

    thank you very much for your help

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.