Duplicate form submissions

Support MB Frontend Submission Duplicate form submissionsResolved

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #14052
    Ryan LauritsenRyan Lauritsen
    Participant

    We have a frontend submission form that is getting duplicate (and in some cases multiple duplicates) submissions because users are clicking submit multiple times while the form is processing/submitting. Any ideas on how we can prevent this?

    Maybe a way to disable the submit button after the first click (while still allowing for correcting any failed validation)?

    #14060
    Anh TranAnh Tran
    Keymaster

    Hi Ryan,

    This might be a generic problem for all forms. I think your suggestion is good. It can be done with some custom JS.

    #14071
    Ryan LauritsenRyan Lauritsen
    Participant

    Thanks, Anh. How can I utilize the submitHandler for jQuery Validate with metabox?
    https://jqueryvalidation.org/validate/#submithandler

    #14077
    Ryan LauritsenRyan Lauritsen
    Participant

    Nevermind. I've figured out a solution.

    #14079
    Ryan LauritsenRyan Lauritsen
    Participant

    I'm still struggling with this. Anything I do with the validate() method in my own javascript file (enqueued via rwmb_enqueue_scripts hook) is causing the metabox validation function to not work. No jquery form validation occurs. Any suggestions?

    #14092
    Anh TranAnh Tran
    Keymaster

    Hi Ryan, I think the validate method works only once, e.g. if you implement a validation on the form, then Meta Box's validation won't work.

    A simple workaround is copying the code from validate.js to your file.

    Probably I'll make this feature in the next version. Letting you or other developers doing this seems a little bit confusing.

    #14107
    Ryan LauritsenRyan Lauritsen
    Participant

    Thanks, Anh. I still can't get this to work. When I replace metabox's valide.js with my own javascript file, validation doesn't work at all. The form can be submitted without any validation.

    Can you send a fix to me before you push it out with the new version of metabox so that I can get it implemented right away? We really need a fix ASAP.

    Thank you.

    #14138
    Anh TranAnh Tran
    Keymaster

    Hi Ryan, I've just fixed this bug and sent you a copy via email. Please try it and let me know the result.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.