Re: [SMARTY] Empty element for html_options

From: Date: Tue, 21 Mar 2006 18:02:57 +0000
Subject: Re: [SMARTY] Empty element for html_options
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-13375@lists.php.net to get a copy of this message
Wojciech Duda wrote:
<select name="type_id">
    <option value='null'>-- none --</option>
    {html_options name=type options=$cust_options selected=$type_id}
</select> This will give me two select tags, one inside the other am I right? Does not seem easy to work with. Try instead:
<select name="type_id"> <option value='null'>-- none --</option> {html_options options=$cust_options selected=$type_id} </select> Note that I removed the "name=type" from html_options. If you put it in, Smarty generates the <select> tags accordingly. If you don't, it doesn't. -- Mark Rogers More Solutions Ltd :: 0845 45 89 555

« previous php.smarty.general (#13375) next »