freelance84 Posted August 31, 2010 Share Posted August 31, 2010 Is it possible to have the <select> tag have a default value which isn't in the options list? ie something to the tune of: <select name="gamer_name" value="select a name"> <option>john</option> <option>dave</option> </select> Link to comment https://forums.phpfreaks.com/topic/212195-default-non-option-select-value/ Share on other sites More sharing options...
haku Posted September 1, 2010 Share Posted September 1, 2010 No. The default value can only be a value in the <option>s. Link to comment https://forums.phpfreaks.com/topic/212195-default-non-option-select-value/#findComment-1105907 Share on other sites More sharing options...
freelance84 Posted September 1, 2010 Author Share Posted September 1, 2010 Thanks. After a messing around i've worked in a work around so the default is "select a name" but if the user hits go on this option js or php does nothing with it. Bit of a faf, shame there is not default non-option Link to comment https://forums.phpfreaks.com/topic/212195-default-non-option-select-value/#findComment-1106001 Share on other sites More sharing options...
haku Posted September 1, 2010 Share Posted September 1, 2010 The way you have done it is actually the best way to do it. Link to comment https://forums.phpfreaks.com/topic/212195-default-non-option-select-value/#findComment-1106112 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.