[development] Forms API #id questions

Steven Wittens steven at acko.net
Sun Jan 15 19:52:22 UTC 2006


>
>> Why is there no #id property allowed on hidden form elements?
>
>
> Feel free to roll a patch against theme_hidden.
>
Automatic id's were removed for hidden elements, because having the same 
form twice on a page would cause <input type="hidden" name="form_id" 
id="form_id" /> to appear twice, breaking XHTML validation.

But you can add an id manually with '#attributes' => array('#id' => 
'foo'), there is nothing that disallows it.

Steven



More information about the development mailing list