Hey. Hope you are fine.
I already created same topic on wordress.com(https://wordpress.org/support/topic/disable-the-submit-button-after-first-click/), but Jonathan Martínez(I believe the developer of this plugin) recommended to me to post it here.
Could you help me with disabling the submit button after pressing it first time? Right now if a user presses on it more than once the action repeats and it spoils Google reCaptcha ID, it become invalid.
So, the only option I see here is set it disable after pressing on it. But I know that the form is having some kind js validations and it can don’t pass it. So, how can I enable it back if such thing happened?
Maybe there is some event that I could use to enable and disable the submit button?
Best regards,
Ivan.
Hi @Rob LeVine.
Thank you for your attention. Unfortunatelly I see that forms are doing some verifications before submit, and in some cases it can show some error instead of submit it. So I cannot just disable this button, because a user won't send it anymore. The only option I see here is try to catch some events that after a user submit button, like - verification start, verification end, submitting start.
I found out that forms get a class "frm_loading_form" during this event, so maybe I could try to check this if this class exists.
Please login or Register to submit your answer