Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6249175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:11:21+00:00 2026-05-24T13:11:21+00:00

I have a form that uses jQuery Validate. You click the Submit button, form

  • 0

I have a form that uses jQuery Validate. You click the Submit button, form gets validated and submitted via ajax. I want to add a step to this process.

I want to check for the presence of a value, say x. If x is NOT in the form I want to go ahead and submit it as I already do. If it IS in the form I want to open a modal window that requests further info THEN submits the form with that extra info added into the request.

Currently I can get the modal to trigger but then the form just continues with the submission. How do I get the form submission to pause while the modal is dealt with by the user?

jQuery Validate has a “success” option that is called after successful validation (which is when I want to check for triggering the modal) but that still doesn’t pause execution.

In a nutshell: How do I validate a submitted form, check if the value x is present, if it is not present submit the form but if it is present pause the submission, pop up a modal window, let the user fill in some more data (and presumably click a “done” or “cancel” button of some sort), add that to the collected form data and then submit the lot? The pausing submission part has me stumped.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:11:22+00:00Added an answer on May 24, 2026 at 1:11 pm

    Use submit() on the first form…

    $('#form1').submit(function() {
        // The below validation goes in here
    });
    

    Validate it…

    $("#form1").validate({
        // Whatever rules you want to validate by   
    });
    

    Check if the form is valid…

    if($('#form1').valid()) {
        // Branching on x, example below, will go in here
    } else {
        // It's not valid, stop the submission
        return false;
    }
    

    Branch on x. If present, open the modal, if not return true to submit the form as is

    if (x !== undefined) {
        // Here is where you also need to pass the other form data to the modal
        // append hidden text fields to the form and populate with the values 
        // Open your modal window, then stop the default submit process
        $('#themodalwindow').openModal();
        return false;
    } else {
        // No x so submit the form as is
        return true;
    }
    

    Now you have to submit the form in the modal…

    $('#form2').submit(function() {
        return true;
    });
    

    If you appended the data collected in form1 to form2 then submitting the form will include everything you need. BTW, you can cache some stuff in that but this is the gist of it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form that uses jQuery to submit an ajax post and it
The basics: I have a contact form that uses php to validate the forms.
I have a form that uses the validation plugin, but I need to validate
I have a form that uses jQuery-UI's selectable plugin to populate a list from
I have a form that uses a JQuery Json post. I have 10+ textboxes
I have a basic CRUD form that uses PageMethods to update the user details,
I have a windows form application that uses a Shared class to house all
I have a web report that uses a Django form (new forms) for fields
I have a form generator that uses (perl compatible) regexes for ther backend validation.
I have a pretty standard contact form that uses a cfc for processing now.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.