trampolinejoe Posted November 26, 2008 Share Posted November 26, 2008 Hey, anybody know how to preselect a option in a multiselect menu? Link to comment https://forums.phpfreaks.com/topic/134342-solved-preselect-a-multiselect-option/ Share on other sites More sharing options...
gaza165 Posted November 26, 2008 Share Posted November 26, 2008 What do you mean by a 'multiselect'...some code would be useful.... what are you tring to do?? Link to comment https://forums.phpfreaks.com/topic/134342-solved-preselect-a-multiselect-option/#findComment-699417 Share on other sites More sharing options...
trampolinejoe Posted November 26, 2008 Author Share Posted November 26, 2008 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> Link to comment https://forums.phpfreaks.com/topic/134342-solved-preselect-a-multiselect-option/#findComment-699419 Share on other sites More sharing options...
gaza165 Posted November 26, 2008 Share Posted November 26, 2008 <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.... Link to comment https://forums.phpfreaks.com/topic/134342-solved-preselect-a-multiselect-option/#findComment-699420 Share on other sites More sharing options...
trampolinejoe Posted November 26, 2008 Author Share Posted November 26, 2008 thanks mate Link to comment https://forums.phpfreaks.com/topic/134342-solved-preselect-a-multiselect-option/#findComment-699423 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.