The form below is connected to a database and I would like the first two inputs in the form to display the data from the database in the form of a drop-down menu. Right now, all three inputs in the form have text entry inputs. I am still learning how to work around HTML and I would like to apologize in advance if this is too trivial of a question. I have searched around the web but couldn't find a clue to my question. Please find the HTML code below:

<div id="demo">
        <div class="ui inputs">
            <div class="ui icon input">
              <input type="text" value="" placeholder="Sending From" class="form-control"/><i class="icon-user"></i>
            </div>
            <div class="ui icon input">
              <input type="text" value="" placeholder="Sending To" class="form-control"/><i class="icon-envelope"></i>
            </div>
             <div class="ui icon input">
              <input type="text" value="" placeholder="Weight" class="form-control"/><i class="icon-envelope"></i>
            </div>
         </div>
            <div class="bus"><a href="#fakelink" class="ui button">Quote</a></div>
</div>

If you want to use a drop down menu, you could easily use the <select> element. You'd poplulate the <option> elements for this drop down using your server side code.

Here is an example of how to create a drop down manually..

<select>
  <option value="1">Item 1</option>
  <option value="2">Item 2</option>
  <option value="3">Item 3</option>
</select>

You would simply just build this server side so its dynamic.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.