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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:03:41+00:00 2026-06-11T10:03:41+00:00

I have a Multi Select dropdown, from where users selects multiple items. On the

  • 0

I have a Multi Select dropdown, from where users selects multiple items.

On the basis of option values selection, dynamic Textbox should generate in the same form.

On selecting single option, 3 textbox should generate.
1st textbox showing values of the selected option
2nd textbox showing text of the selected option
3rd textbox showing null.

<html>
  <head>
    <script src="http://code.jquery.com/jquery-latest.js"></script>
  </head>
  <body align="center">
    <input type="text" value="some text"/>
    <select id="multiple" multiple="multiple" style="width: 120px;height: 120px;">
      <option value="1" >Ashutosh</option>option value="6">Jems Bond</option>
      <option value="7">Danial Crack</option> option value="8">Dan Brown</option>
      <option value="9">Angilina Jolly</option>
    </select>
    <script>
      function displayVals() { 
        var multipleValues = $("#multiple").val() || [];
        $("input").val(multipleValues);
      }
      $("select").change(displayVals);displayVals();
    </script>
  </body>
</html>
  • 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-11T10:03:43+00:00Added an answer on June 11, 2026 at 10:03 am

    Here i have made complete solution for your query. please check demo link as shown below:

    Demo http://codebins.com/bin/4ldqp7a

    HTML

    <form id="frm">
      <select id="multiple" multiple="multiple" style="width: 120px;height: 120px;">
        <option value="1" >
          Ashutosh
        </option>
        <option value="6">
          Jems Bond
        </option>
        <option value="7">
          Danial Crack
        </option>
        <option value="8">
          Dan Brown
        </option>
        <option value="9">
          Angilina Jolly
        </option>
      </select>
      <div id="result">
      </div>
    </form>
    

    JQUERY

    $(function() {
        $("#multiple").change(function() {
            var multipleValues = $("#multiple").val() || "";
            var result = "";
            if (multipleValues != "") {
                var aVal = multipleValues.toString().split(",");
                $.each(aVal, function(i, value) {
                    result += "<div>";
                    result += "<input type='text' name='opval" + (parseInt(i) + 1) + "' value='" + value.trim() + "'>";
                    result += "<input type='text' name='optext" + (parseInt(i) + 1) + "' value='" + $("#multiple").find("option[value=" + value + "]").text().trim() + "'>";
                    result += "<input type='text' name='option" + (parseInt(i) + 1) + "' value=''>";
                    result += "</div>";
                });
    
    
            }
            //Set Result
            $("#result").html(result);
    
        });
    });
    

    CSS

    #multiple{
      margin-bottom:10px;
      border:1px solid #333;
      background:#efefef;
      color:#000;
    }
    #result input{
      margin-left:5px;
      border:1px solid #333;
      background:#a4c4f4;
      margin-top:5px;
    }
    

    Demo http://codebins.com/bin/4ldqp7a

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

Sidebar

Related Questions

I have a multi select dropdown eg: <select id=myList multiple=multiple> <option value=1>Opt #1</option> <option
Using Symfony and Doctrine, I have a multi-select list box. The multiple default values
I do have a multi select dropdown box. I want all the selected items
I have this HTML code which simulates a dropdown multi-checkbox <div> <div class=select> <span>Select
I have multiple multi-select boxes with the same class and i want to unselect
I have an .aspx page with a databound multi-select jquery dropdown. This works nicley
I have a multi-table SELECT query which compares column values with itself like below:
have an array of values [1,2,4] representing the values of a multi-select box, how
I'm using jQueryUI multi-select Widget that draws a nice dropdown menu widget for multi-selects.
I have multi-select drop down list where in user can select multiple options, now

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.