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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:53:01+00:00 2026-05-28T03:53:01+00:00

I have a page which dynamically creates multiple forms, each form had a unique

  • 0

I have a page which dynamically creates multiple forms, each form had a unique “id”
Within each form is one hidden input field always with the same”id” and “name”

What I am wanting to do is with each form to be able to do an ajax(post) call, which I can do, my issue is getting the input field value from the from ..

So I can get the

    $(document).ready(function() {



var n = $("form").size();
alert('there are ' + n + ' forms');

$('form').submit(function(event){
    event.preventDefault();

    var formName = $(this).attr('id');
    alert(formName);

});

});

So what I amnting to do is to get the value of the input field in the form that has been triggered, the id is held in the var formName

I have been stabbing away but getting no-where fast…

Thanks

Simon

  • 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-28T03:53:01+00:00Added an answer on May 28, 2026 at 3:53 am

    Put your hidden element ID into the find(). And make .ajax() with passing hiddenValue to data.

    $('form').submit(function(event){
        event.preventDefault();
        var hiddenValue = $(this).find('#id-of-hidden').val();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form in struts 1.3 which is dynamically generated one and having
I have a webpage which dynamically creates markup within itself. On the click of
I have created a small WP7 app which contains one page which is dynamically
I have a page that displays multiple Formsets, each of which has a prefix.
I have a form with a panel on which I dynamically load multiple user
Situation: I have several Gridviews on one page, and each Gridview has a dynamically
I have a page which dynamically loads a section of content via AJAX. I'm
I have a page on which I must load controls dynamically based on the
I have a page in which I am loading a user control dynamically as
I have a form on my page which gives the user the possibility to

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.