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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:11:20+00:00 2026-06-05T01:11:20+00:00

This should be easy, but I am missing something. I have the following form:

  • 0

This should be easy, but I am missing something.

I have the following form:

<div id="rsvp">
<form class="form-inline">    
    <fieldset>
        <label class="control-label" for="input01" id="rsvp_label">John Smith</label>
        <label class="control-label">Attending?:</label>          
        <label class="radio"><input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>Yes</label>
        <label class="radio"><input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">No</label>            
        <label class="control-label small" for="select01" id="meal">&nbsp;&nbsp;Meal Selection:</label>
        <select id="selectMeal" class="input-small">
            <option>Chicken</option>
            <option>Beef</option>
        </select>
        <button type="submit" class="btn btn-primary" id="btnrsvp">Save / Confirm Changes</button>                      
    </fieldset>
</form>
</div>

I am successfully pulling out records in the database that match my query, and I have 1 -> n records. I’d like to clone this form for each record. So I can loop through the records, but am having trouble figuring out how to go about actually cloning the fieldset and then incrementing the ids so that I can attach a form action to each one. Or perhaps there’s a better way to do 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-06-05T01:11:21+00:00Added an answer on June 5, 2026 at 1:11 am

    If the whole form uses class instead of ID for elements you can clone and re-use at will without needing to parse ID’s. Track the record ID with a data attribute or a hidden input in each form.

    If you have event handlers on any of the form field elements that are dependent on other fields in the form, you would simply look them up within the context of the individual form

    Event handler example ( select ID changed to class):

     <select class="input-small selectMeal">
        <option>Chicken</option>
         <option>Beef</option>
     </select>
    

    JS

    $('.selectMeal').change(){
       var rsvp_name= $(this).closest('.form-inline').find('.rsvp_label').text();
       if( rsvp_name=='John Smith')  doSomething();
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

OK, I'm feeling like this should be easy but am obviously missing something fundamental
Feel like this should be something easy that I'm missing. I have a table
Seems like this should be easy but I must just be missing something... I
This seemed like it should be easy, but I have had trouble getting it
I am sure this should be easy, perhaps I am missing something obvious. I
This seems like it should be easy yet I must be missing something. I
This should be an extremely easy fix, but for some reason I am missing
It seems this should be easy but I'm having a lot of difficulty using
This should be very easy but I don't know how to do it. I
This should be an easy problem but... I need to format a currency for

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.