This topic contains 1 reply, has 2 voices, and was last updated by Jai Jai 9 months, 3 weeks ago.

Jquery validation inside modal


  • Thavo
    Participant

    Posts: 12
    Member Reply #13653

    Hello,

    How do I apply jquery validate form inside modal form.
    Every Time that I submit it refreshes my page with all parameters in the URL.
    What’s the best way to apply that?

    Best regards,

    Jai
    Jai
    Keymaster

    Posts: 2700
    Support Staff Reply #13656

    Hi 🙂

    Can you try to add preventDefault() in your submit listener?

    Something like this;

    $( “form” ).submit(function( event ) {
    // do validation
    if (! validate) {
    event.preventDefault();
    }
    });

    Thanks

You must be logged in to reply to this topic.