Re: [SMARTY] Empty element for html_options

Mark Rogers <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Organization Quarella Ltd
Message-ID <[email protected]>
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

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.