- This topic has 0 replies, 1 voice, and was last updated 5 years, 5 months ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › Disable login form after submit via onClick
Tagged: javascript, onclick, Registration
Hi!
I have a bit of a delay after someone registers (I think it’s Mailgun that’s holding the page up) so I’d like to disable the submit button (and even change the label to Please Wait) after someone clicks so they don’t try to resubmit the form and then get a “this username is taken” message.
Any ideas how to do this?
For now, I have added:
add_filter('swpm_before_registration_submit_button', 'my_custom_code');
function my_custom_code($output) {
//Add any extra text or HTML code
$output .= '<p><strong>Please only click the button once - it may take up to 10 seconds to process.</strong></p>';
return $output;
}
To the theme functions file – but this is not the ideal solution.
Thanks!