Forum Moderators: coopster

Message Too Old, No Replies

Drop down list menu.

How do I make one selection required?

         

bartainer

11:12 pm on Oct 5, 2005 (gmt 0)

10+ Year Member



Hello,

How do I make one item required on my "drop down" list menu? E.g., let's say that I want one state to be selected, how do I make this possible with PHP? My PHP skill is amature, but I do understand most.

I'm using DW 8.

Thanks.

grandpa

4:47 am on Oct 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi

This really isn't a PHP issue. You can make any item in a drop down list to be a default selection by adding the word selected.

Here's a snippet from one of my drop down lists. The first item is automatically selected. While this list appears on a PHP page, the form elements follow standard markup.

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