html_options oversight
| From: | Gerard Samuel | Date: | Sat, 24 Jan 2004 17:31:08 +0000 |
| Subject: | html_options oversight | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-2066@lists.php.net to get a copy of this message | ||
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>
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.