Disable submit button after click
Hi
In version 4, I implemented a JS function to disable the submit button once it was clicked in order to prevent double submits. For this, I had the following custom code action in the onload event:
And the following code was placed in a Load JS action:
However, the PHP code is no longer working in version 5. How can I call the JS code once the JS validation was completed successfully?
Many thanks
Daniel
In version 4, I implemented a JS function to disable the submit button once it was clicked in order to prevent double submits. For this, I had the following custom code action in the onload event:
$form->form_params->set('jsvalidation_onValidateSuccess', 'preventMultipleSubmits');
And the following code was placed in a Load JS action:
function preventMultipleSubmits(){
$('submit_btn').disabled = true;
$('submit_btn').value = 'Bitte warten...';
};
However, the PHP code is no longer working in version 5. How can I call the JS code once the JS validation was completed successfully?
Many thanks
Daniel
Hi Daniel,
Please see this FAQ that shows you how to add a function on validation success in CFv5.
You could also use the Submit Limit action from the Security actions group in the Setup tab - that will block repeated submissions for a specified time period.
Bob
Please see this FAQ that shows you how to add a function on validation success in CFv5.
You could also use the Submit Limit action from the Security actions group in the Setup tab - that will block repeated submissions for a specified time period.
Bob
This topic is locked and no more replies can be posted.