Jump to content

[SOLVED] Preselect a multiselect option


trampolinejoe

Recommended Posts

Hello Gaza

 

When the page loads I want it to have both red and black already selected.

 

<select name='product[]' id='product' size='5' tabindex='1' class='validate required product productMsg' multiple>
<option value="150">red</option>
<option value="151">black</option>
<option value="151">blue</option>
</select>

 

 

<select name='product[]' id='product' size='5' tabindex='1' class='validate required product productMsg' multiple>
<option value="150" SELECTED>red</option>
<option value="151" SELECTED>black</option>
<option value="151">blue</option>
</select>

 

There you go....

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.