RE: [SMARTY] html_options suggestion
| From: | Steve | Date: | Tue, 21 May 2002 20:48:41 +0000 |
| Subject: | RE: [SMARTY] html_options suggestion | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4342@lists.php.net to get a copy of this message | ||
The way I do this is add the option(s) in the template. Ultimately, I see
this as a designers element.
For example
<select name="man">
<option>Select a Manufacturer</option>
{html_options options=$manOptions selected=$currentMan}
</select>
Seems like adding this small functionality may not be worth any amount of
overhead. I could be wrong.
Steve
-----Original Message-----
From: G [mailto:gerard@interfold.com]
Sent: Tuesday, May 21, 2002 1:19 PM
To: smarty-general@lists.php.net
Subject: [SMARTY] html_options suggestion
Small suggestion for html_options :)
How about adding a "default" attribute or something so that if the
"selected" value doesn't exist, default would get added to the options and
be selected? Right now if selected doesn't exist, the first option is
selected (I add a blank array entry to values/output/options to deal with
this).
Gerard
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php