|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
douglassdavis Smarty Junkie
Joined: 21 Jan 2008 Posts: 541
|
Posted: Sat Nov 22, 2008 12:17 am Post subject: html_options empty option |
|
|
how about adding an option to html_options to give an empty option at the beginning. like for when the user wants to select nothing.
it's easier than merging an empty entry at the beginning of the array in PHP. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Sat Nov 22, 2008 12:33 am Post subject: |
|
|
Many ways to handle it, but probably the easiest:
Code: | <select name="foo">
<option value=""></option>
{html_options ...}
</select> |
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|