[whatwg] input type=hidden outside phrasing content

Andy Lyttle whatwg at phroggy.com
Thu Oct 16 14:59:34 PDT 2008

>> <table>
>>   <tr>
>>     <input type="hidden" ...>
>>     <td></td>
>>   </tr>
>> </table>

This is something I wanted to do recently.  I was building HTML in a  
Perl script, adding table rows in a loop, and I wanted some rows to  
contain text field with user-editable value, while for other rows I  
wanted the value to be displayed but not editable (and I didn't want  
to use a disabled text input, I wanted the value displayed as plain  
text and use a hidden input with the value preset).  I believe I  
wound up putting the <input> inside the <td>, which worked well  
enough but if putting it directly inside the <tr> were valid I  
probably would have done that.

Andy Lyttle
whatwg at phroggy.com

More information about the whatwg mailing list