Hello @bakhshi
If you want to display the loading progress for 10 seconds by pressing a button, you can enter the following piece of code as its onclick event:
jQuery('#fbuilder').append('<div class="cff-processing-form"></div>');setTimeout(function(){jQuery('.cff-processing-form').remove()}, 10000);
Best regards.
Should I disable “display calculation in progress indicator” option?
I have a piece of code in the OnClick event box:
jQuery(this.form).valid();
I do not know, how should I combine with your code?
Thanks in advance
-
This reply was modified 5 years, 1 month ago by
Bakhshi.
Hello @bakhshi
You can implement something similar to:
if(jQuery(this.form).valid()){jQuery('#fbuilder').append('<div class="cff-processing-form"></div>');setTimeout(function(){jQuery('.cff-processing-form').remove()}, 10000);}
Best regards.
Actually before asking my last question, I had tested it with if condition, but it didnot work.
link
calculation field: fieldname110
-
This reply was modified 5 years, 1 month ago by
Bakhshi.
Hello @bakhshi
You have assigned two onclick events to the fieldname110 field, one of them through its settings and another through an “HTML Content” field. The last onclick event calls the .off method to unsubscribe the onclick events.
Best regards.
Thanks to your advice!
I cannot set .off method to unsubscribe the onclick events. because if I unsubscribed the onclick events, my calculate button wouldnot depend on capthca code.
by the way, I have used OnMouseDown event option, I pasted the piece code in the OnMouseDown event and it works for one form.
jQuery('#fbuilder').append('<div class="cff-processing-form"></div>');setTimeout(function(){jQuery('.cff-processing-form').remove()}, 10000);
sorry, I am having a problem with that, actually it works for one form: page link with one form
but I have two formes in one page with this HTML code:
<div id="first_form">[CP_CALCULATED_FIELDS id="53"]</div>
<div id="second_form" style="display: none;">[CP_CALCULATED_FIELDS id="54"]</div>
I enabled loading progress and used your piece code in OnMouseDown event field for both of them, but I do not know why it works for only first form and neither does second form?! page link with two formes
Thank you for your help.
-
This reply was modified 5 years, 1 month ago by
Bakhshi.
Hello @bakhshi
In this case the pieces of code to use would be similar to:
For the first form:
if(jQuery(this.form).valid()){jQuery('#first_form #fbuilder').append('<div class="cff-processing-form"></div>');setTimeout(function(){jQuery('.cff-processing-form').remove()}, 10000);}
For the second form:
if(jQuery(this.form).valid()){jQuery('#second_form #fbuilder').append('<div class="cff-processing-form"></div>');setTimeout(function(){jQuery('.cff-processing-form').remove()}, 10000);}
Note the use of selectors '#first_form #fbuilder' and '#second_form #fbuilder' respectively.
Best regards.
Thank you very much indeed