Hello everybdoy..
i am using multple select i.e. <select multiple="multiple"></select>
for the first time as a replacement of checkbox..
My Questions?
1>how to insert the multiple selected values..?
2>how to auto select the multiple values...?
3>how to edit the multiple values..?
Any suggestion,advice,help...etc are warmly welcome!!
Anyway Thanks a lot
<select multiple="multiple"></select>
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: <select multiple="multiple"></select&
I usually make the select value an array and then implode() it.PHPycho wrote:1>how to insert the multiple selected values..?
Set all options that are selected to "selected="selected"". If you implode then explode() to get back to an arrayPHPycho wrote:2>how to auto select the multiple values...?
Not sure what you mean?PHPycho wrote:3>how to edit the multiple values..?
Last edited by Christopher on Wed Jan 24, 2007 2:10 pm, edited 1 time in total.
(#10850)
Code: Select all
<select name="name" multiple="multiple">
<option value="1" selected="selected">One</option>
<option value="2" >two</option>
<option value="3" >three</option>
<option value="4" selected="selected">four</option>
<option value="5" >five</option>
</select>EDIT: I didn't notice this was in the PHP - code forum... I assumed the OP was asking an HTML question.