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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:50:53+00:00 2026-05-25T10:50:53+00:00

I currently have a registration form which when clicked from a link opens up

  • 0

I currently have a registration form which when clicked from a link opens up in a jQuery dialog modal box. I have used .delegate when the form is submitted.

The JS

$('.regForm').delegate("#submit" , "click" , function(event) {

    event.preventDefault(); 

    var form_data = {
        username: $('#regUsername').val(),
        password: $('#regPassword').val(),
        confirm_password: $('#regConfPass').val(),
        email: $('#regEmail').val(),
        confirm_email: $('#regEmailConf').val()
    };
});

The html

<div class="regForm">
        <form action="http://adomain.com/register/jsReg" method="post" accept-charset="utf-8" >
            <table class="regFormTable">
                <tr>
                    <td>Username</td>
                    <td><input class="regInput borderradius3" type="text" name="username" id="regUsername"/></td>
                </tr>
                    <td></td>
                    <td><input type="submit" class="button borderradius3" value="Register" id="submit"/></td>
                </tr>
            </table>
        </form>
    </div>

The problem is that when I close and reopen the dialog box the forms input values are the same as the first ones.I think it is looking for the first set of id’s which match and then getting the values, I may be wrong. I have looked at trying to get the values using event.target but I’m unsure of how get the values.

Any help on this would be much appreciated 🙂

  • 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-25T10:50:53+00:00Added an answer on May 25, 2026 at 10:50 am

    IDs have to be unique. Your problem sounds like you have multiple elements with the same ID.
    Do you create a new regForm, each time you open the dialog? If so: To ensure that your IDs are unique, you could remove the “regForm” after you got the values or you could reset the form values and reuse the existing “regForm” next time user clicks.

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

Sidebar

Related Questions

I currently have a registration form which checks a persons date of birth via
I have registration form, which is saving user info in 'tblusers' -> 'Username', but
I'm using Zend Framework and I currently have an existing form using zend-form which
I have simple user registration form. In which i am puting city as a
I currently have a functioning in-house Windows Forms application which extensively uses the DataGridView
I currently have a DetailsView in ASP.NET that gets data from the database based
I have a form that once you select from a drop-down list and select
I have made a form for client registration, and I can't make this postvalidators
I have a product registration form that allows the user to add additional product
I have a working web application which already has a login and registration system.

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.