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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:49:08+00:00 2026-06-14T05:49:08+00:00

I playing around with dropdown lists, and I am wondering on how I would

  • 0

I playing around with dropdown lists, and I am wondering on how I would dynamically add input box based on a number selected from a dropdown list. e.g. if one is selected then add one input box, if two then add two input boxes etc… . Any tips or guidance would be appreciated
Thanks

  • 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-14T05:49:09+00:00Added an answer on June 14, 2026 at 5:49 am

    I can show you a simple method using jquery:

    html

    <select id="dropdown">
      <option value="0">Select number of inputs</option>
      <option value="1">1 input</option>
      <option value="2">2 inputs</option>
      <option value="3">3 inputs</option>
      <option value="4">4 inputs</option>
    </select>
    <div id="input-holder"></div>​
    

    jquery

    $('#dropdown').change(function(){
        if ($(this).val() > 0) {
          $('#input-holder').empty();
          for (i = 1; i <= $(this).val(); i++) {
            $('#input-holder').append('<input type="text" name="input'+i+'" value="' + i +'" >');
          }
        }
    });​
    

    Of course this is just an example and it can be done in multiple other ways.

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

Sidebar

Related Questions

Was playing around a little bit with the TimeSpan class and I started wondering
Playing around with MapKit and I'm wondering ... Is it possible to determine where
iam playing around with OPEN CV from Intel with the associated PHP Extensions. Works
After playing around with AMD/RequireJS I was wondering if it is a good idea
Playing around with jQuery a bit (sorry, complete noob) I was wondering why this
Playing around with html5 video and was wondering if there was a way to
I playing around with the sftp example from here: Stackoverflow: twisted conch filetransfer I
Playing around with Upshot and the DbDataController all seems fine. I am wondering if
Playing around with Python - tkInter - Entry widget - when I use validatecommand
Playing around with MongoDB and NoRM in .NET. Thing that confused me - there

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.