niiki-lou Posted July 4, 2009 Share Posted July 4, 2009 Hello everyone! Im working with a form but i need a little help in changing the drop downs to radio buttons but my problem is ive never use radio buttons ive looked at some tutorials but im still a little unsure how to convert <tr><td><p>Show email?</p></td><td><select name='show_email'><option selected='selected' value='no'>No</option><option value='yes'>Yes</option></select></td><td></td></tr> <tr><td><p>Show age?</p></td><td><select name='show_age'><option selected='selected' value='no'>No</option><option value='yes'>Yes</option></select></td><td></td></tr> Into a radio button option as using drop downs always puts my age and email setting as no when i edit my account if i dont select yes again which i dont want to have to keep doing, Any help is appretiated greatly, Thanks Nikki Link to comment https://forums.phpfreaks.com/topic/164783-converting-drop-down-to-radio-buttons/ Share on other sites More sharing options...
Cetanu Posted July 5, 2009 Share Posted July 5, 2009 Um...I think this should do it: Yours: <select name='show_email'><option selected='selected' value='no'>No</option><option value='yes'>Yes</option> <select name='show_age'><option selected='selected' value='no'>No</option><option value='yes'>Yes</option></select></select> Radio: <input type="radio" value="no" name="show_email" checked>No <br/> <input type="radio" value="yes" name="show_email">Yes <input type="radio" value="no" name="show_age" selected>No <br/> <input type="radio" value="yes" name="show_age">Yes Link to comment https://forums.phpfreaks.com/topic/164783-converting-drop-down-to-radio-buttons/#findComment-869071 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.