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 7501777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:39:02+00:00 2026-05-29T20:39:02+00:00

SO for some reason my form is submitting two times with a single button

  • 0

SO for some reason my form is submitting two times with a single button press. This is my first time using jquery Form plugin, and I imagine that jquery is submitting once and the form is “naturally” submitting as well. I have seen that the remedy is to attach a “return false” to the onSubmit event handler of the form. I thought I am doing that, but obviously it is not working.

Can anyone help?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>User form entry </title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="jquery.validate.js"></script>
<script src="jquery.passwordStrength.js"></script>
<script src="jquery.form.js"></script>
<script>

$(document).ready(function() {
    $('#signupForm').ajaxForm(function() { 
         var queryString = $('#signupForm').formSerialize(); 
         $.post('process.php', queryString);
    });
});
</script>
</head>
<body>
   <form id="signupForm" action="process.php" onsubmit="return false" method="post">
   <fieldset class="password">
          ... form goes here
   <button type="submit" name="formSubmit" value="submit">Click to submit</button>
   </form>

<div id="results"></div>

</body>
</html>

I have tried adding onsubmit=”return false” to the form element, but then I have no submission at all. I have also tried adding “return false;” to the jQuery, but then I still have double submissions. What am I missing? This seems to be the standard methodology according to the jQuery Form Plugin site.. how is my form different?

(By the way, just to be clear.. I am not talking about the problem of having multiple consecutive form submits by pressing the button repeatedly. My problem is “one submit button push = two submits”.)

  • 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-29T20:39:04+00:00Added an answer on May 29, 2026 at 8:39 pm
    $('#signupForm').ajaxForm(function() { 
                var queryString = $('#signupForm').formSerialize(); 
                $.post('process.php', queryString);
    
    });
    

    This is submitting it twice …. the ajaxForm method once and then the post() the second time

    The ajaxForm method handles the form sumbission for you … you dont need to add the post() method … the function inside of ajaxForm is a callback, executed on success …

    $('#signupForm').ajaxForm(function() { 
           alert("Thank you for your comment!"); 
    });
    

    this code would show the alert after the successful post … simple example here -> http://jquery.malsup.com/form/

    You should also remove the onsubmit attribute from the form …

    Update

    If you want to show results … do it like this :

    $(document).ready(function() { 
        $('#signupForm').ajaxForm({ target: '#results' }); 
        // this will output the responseText from the submitted form to the target DOM element
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using reCaptcha in this form I build, but for some reason, it loses
For some reason, after submitting a string like this Jack’s Spindle from a text
For some reason my PDF upload form is failing consistently, I have this code:
Possible Duplicate: jquery ajax call taking too long or something for some reason this
For some reason, my form is always at 100% opacity. I've tried changing it
Have a simple form (only extract fields here) but for some reason the JQserilization
I've created a login submit form in HTML but for some reason user/password autocompletion
For some reason I never see this done. Is there a reason why not?
I have a jQuery post submitting a form to a controller create action, which
So i'm submiting form with jquery to ifram like this $('.form').submit() here is my

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.