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

  • Home
  • SEARCH
  • 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 8606985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:13:48+00:00 2026-06-12T03:13:48+00:00

I have a sitution where the user can select which test they want to

  • 0

I have a sitution where the user can select which test they want to enter info for.
Example:

Test1
Test2
Test3
Test4

When the select say Test1,Test3, I need to create a form with just these two textbox fields(Test1, Test2). I was thinking about looping through the options the user selected and then doing a show, hide through jquery but not sure if this is the best way of going about this. Is there a elegant way of just showing the fields that the user chose?

  • 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-12T03:13:49+00:00Added an answer on June 12, 2026 at 3:13 am

    Something like this might be simple:

    <ul id="textboxes">
        <li>
            <input type="checkbox" id="c1" name="c1" />                
            <input type="text" id="t1" name="t1" />
        </li>
        <li>
            <input type="checkbox" id="c2" name="c2" /> 
            <input type="text" id="t2" name="t2" style="display:none" />
        </li>
    <ul>
    

    Then your jQuery:

    $('input[type="checkbox"]').click(function() {
        var id = $(this).attr('id').replace('c','');
        $('#t'+id).slideToggle(); 
    });
    

    Obviously you could have more boxes there. If you were going to go a more dynamic route, with an unlimited, I would go more of a true adding of the fields.

    jsFiddle

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

Sidebar

Related Questions

I have a situation in which user can single tap a control, which show
I have two tables User and UserRole which are they connected using a link
I have situation where a user can manipulate a large set of data (presented
Here's the situation: i have a SearchPage where an user can make a complex
Here's my situation. I have a user table and a password_reset table which references
I have an Excel2010 VBA userform that has one comboBox, from which the user
I'm trying to build a form where a user can select an existing category,
For example, I have 3 tables: user , group and permission , and two
I have the following situation... In a certain View, the user must select the
I have situation like this: user submits form with action='/pay' in '/pay' I have

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.