Hello @dareko
The forms are rendered on the client-side (the browser), and the optimizer plugins do not affect the equations. For example, your form with id="3" has 122 calculated fields with their equations and some of them with dependencies. The form performance would not be improved by an optimizer plugin.
An alternative would be to disable the dynamic evaluation of the equations and enable them after rendering the form.
1. Untick 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. Insert an “HTML Content” field in the form and enter the following piece of code as its content:
<script>
fbuilderjQuery(document).one('showHideDepEvent', function(){
ENABLEEQUATIONS();
EVALEQUATIONS(jQuery('[id*="cp_calculatedfieldsf_pform_"]'));
});
</script>
Best regards.
Thread Starter
dareko
(@dareko)
Thank you very much for the clarification and this alternative idea. Unfortunately at the moment it doesn’t give any noticeable progress.
I will try to test it deeper in a few days.
Thank you once again for your outstanding support.
Kind Regards
Darek
Hello @dareko
Actually, it is preferred to optimize the form structure. Do you need 122 equations? In my opinion, you can implement the form with fewer calculated fields but more elaborated equations by using conditional statements.
Best regards.
Thread Starter
dareko
(@dareko)
I’m afraid in some cases the reduction of equations number would be difficult. However, the form mentioned by you (http://golf.okrasa.eu/?cff-form=3) includes 9 equations only.
I know that I should rather work on optimalization of formulas and theirs notation.
Is it correct that notation:
IF(fieldname1<1,fieldname2,fieldname3)
is better / more offective that:
(function(){
if(fieldname1<1) return fieldname2;
return fieldname3;
})();
Please advise me on this matter.
Hello @dareko
There is no difference between that equations.
Please, indicate the id of the form that takes more time than usual.
Best regards.
Thread Starter
dareko
(@dareko)
The most significant effects are visible at my other page scorecard.okrasa.eu: http://scorecard.okrasa.eu/?cff-form=103
There are ca 100 equations.
At the moment the “Dynamically evaluate the equations…” is unticked and additional HTML code is inserted.
Hello @dareko
With the dynamic evaluation of the equations disabled and enabling them after rendering the form, it is loaded immediately, with no delay. Please, watch the video by visiting the following link:
https://resources.developers4web.com/cff/tmp/2022/11/19/video.mp4
Best regards.