Hello @pexel
As part of the onclick event you should check a global variable, to know if the button was pressed previously. Something like:
if(typeof button_pressed != 'undefined') return;
button_pressed = true;
And you must remove the variable when counter reaches zero:
delete button_pressed;
It ensures the button is pressed only once until the counter finalize.
Regarding your second question about displaying some form fields when printing the form but not on the web, you can assign a custom class name to these fields, ex. fields-for-printing
The class names are assigned to the fields through their “Add CSS Layout Keywords” attributes.
Then you can enter the following style definition through the “Customize Form Design” attribute in the “Form Settings” tab:
.fields-for-printing
{display:none !important;}
@media print{
.fields-for-printing
{display:block !important;}
}
Please note the support does not include developing the users’ projects. Your questions are not about the plugin but the custom behavior of your form. We can offer you a custom coding service directly from the plugin website for additional questions about these subjects. Contact Us.
Best regards.