Stop CF7 Multiclick
Prevent multiple Contact Form 7 submissions due to repeated clicks and itchy trigger fingers. Why Because users are sometimes impatient, and due to styling issues it’s not always apparent that Contact Form 7 is in the process of submitting via ajax. About zaus As seen on WordPress Profile: Zaus and
Prevent multiple Contact Form 7 submissions due to repeated clicks and itchy trigger fingers.
Why
Because users are sometimes impatient, and due to styling issues it’s not always apparent that Contact Form 7 is in the process of submitting via ajax.
About zaus
As seen on WordPress Profile: Zaus and author homepage drzaus.com .
- 01Upload plugin folder stop-cf7-multiclick to your plugins directory ( /wp-content/plugins/ )
- 02Activate plugin
- 03Add the following shortcode immediately after your contact form shortcode: [cf7multiclick] or [cf7multiclick selector=".wpcf7-submit"]
- 04In the “Additional Settings” section of the specific form, add the following on a single line: on_submit: window.cf7multiclick.reactivate('.wpcf7-submit');
- 05Optionally, add a better visual indicator to your form (i.e. gray out) when it’s in the middle of submitting using the provided CSS class .cf7-pending
Frequently asked questions.
How do I use the plugin?
Add the following shortcode on the same WP page as you placed the CF7 form shortcode: [cf7multiclick] . This will “pause” interaction with the submit button, preventing clicks until the form has finished submitting. Add the following callback to the additional settings of the CF7 form itself: on_submit: window.cf7multiclick.reactivate(); By default, both intercepts target the submit button using the selector .wpcf7-submit by default, which is the default CF7 class on the submit button, but if you have multiple forms or different classes/ids/etc, you can specify the selector like:
[cf7multiclick selector=".wpcf7-submit"] on_submit: window.cf7multiclick.reactivate('.wpcf7-submit');