Reset form after submit and remove error messages

Home Forums Quform WordPress Reset form after submit and remove error messages

This topic is: resolved
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #33311
    veganwebagency
    Participant

    Hi,

    I have a form inside a pop-up and this pop-up is used several times on the same page.
    Now I have two questions:

    1. Is there a function to reset / recreate the form after the user submitted the form and saw the confirmation message?

    2. Is there a better solution to remove the error messages from the form?
    After searching in the forum I found the following solution:

      $('.quform-field').each(function () {
                $(this).closest('.quform-element').removeClass('quform-has-error').find('.quform-error').remove();
            }); 

    Thanks in advance
    Michèle

    #33317
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #33319
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #33322
    veganwebagency
    Participant

    Hi Ally

    I checked the settings and they are correct but the form is still empty if you close the pop-up after you saw the confirmation message and open a new one (with the same form).

    I also tried your code but that doesn’t help either with recreating the form.
    But the code worked perfectly for clearing all error messages so thank you for that. 🙂

    Here is a link to the page I’m working on:
    I also have your reset code implemented which gets fired if you close the pop-up.

    Regards
    Michèle

    #33327
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #33331
    veganwebagency
    Participant

    Hi Ally

    Yeah I need the option ‘hide form’ because I don’t want the form to be visible after submitting it.
    I added your code and it works perfectly now! 🙂

    Thank you so much for your help! 🙂

    Regards
    Michèle

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy