Re: [SMARTY-DEV] html_options oversight
| From: | messju mohr | Date: | Sun, 25 Jan 2004 15:55:12 +0000 |
| Subject: | Re: [SMARTY-DEV] html_options oversight | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-2067@lists.php.net to get a copy of this message | ||
On Sat, Jan 24, 2004 at 12:31:08PM -0500, Gerard Samuel wrote:
> When using html_options and its input contains no data to
> create html <option> tags, (which can happen), it becomes invalid (X)HTML.
>
> http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#h-17.6
> "A SELECT element must contain at least one OPTION element."
>
> Invalid (X)HTML:
> <select name="foo">
> </select>
how do you manage to do that? when i pass an empty array to
html_options i get no output at all, not even the <select>-tag.
> Valid (X)HTML:
> <select name="foo">
> <option></option>
> </select>
>
> In essesence, html_options should *always* return html <option> tags.
> I would modify it, but its written in such a way, that I'd rather leave it to
> the smarty maintainers to make such modifications.
>
> Thanks.