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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:01:35+00:00 2026-05-13T12:01:35+00:00

I have a page that contains several forms that are identical throughout a page.

  • 0

I have a page that contains several forms that are identical throughout a page. I submit these forms using the $.ajax() method.

As I see it using classes to identify/submit/validate the individual forms will likely be problematic. Passing the form with something like $('.someForms').serialize() would not produce viable results. How would .serialize() select the proper form??

Even if .serialize() would work, I’m not sure how to go about applying any form validation suggestions to specific fields…

The other option I see is to code for each form.

Ex: $('#thisForm').serialize();

I’m curious how you jQuery guru’s handle multiple forms like this?

  • 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-13T12:01:35+00:00Added an answer on May 13, 2026 at 12:01 pm

    There are many ways to select forms. You could select them by their index:

    $("form:eq(0)").serialize(); // serialize first form on page
    $("form:eq(3)").serialize(); // serialize fourth form on page
    

    You could select them by first going through a unique child of theirs:

    $(":input[name='uniqueChild']").closest("form").serialize(); // serialize holder
    

    You could select them by channeling through a unique parent of theirs:

    $("#userDetails form").serialize(); // serialize form within DIV#userDetails
    

    While there are many other ways to access forms specifically, I must say that if you find yourself needing to use any of these aforementioned methods, you probably need to rethink your code a bit.

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

Sidebar

Related Questions

I have a page that contains several forms, by submitting each one of them,
i have a page that contains several submit buttons however i only want one
I have a page that contains an iframe that gets loaded using Javascript: index.html
I have a page which contains several forms. I want to add a single
I have a JSF page that contains a form with several elements, that correspond
I have a page with several forms. I am trying to submit one of
I have a ASPX Page that contains several user controls, which are loaded dynamically
I have a page that contains a parent record and several children records. There
I have a page that contains an iFrame point to a URL with parameters.
I have an aspx page that contains a checkbox, and a button. The button

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.