[whatwg] input type="hidden" and validation

Ian Hickson wrote:
> I believe in HTML5 that we've allowed <input> in most places, 
> which should 
> satisfy your needs. Let us know if it does not. :-)

We discussed this last week
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-October/016655.html
and HTML5 is certainly a step forward in this respect.

Still, HTML5 doesn't allow <input> everywhere in the document.
For visible input fields this is of course a good thing, but
for hidden input it would be good to have more flexibility.
My use-case is a server-side solution that is to automatically
add hidden postable state to just about any HTML fragment (the
<form> is taken care of on an outer level). To make this in a
valid way today presents quite a few challenges like
traversing table models or adding extra <td>:s just for state.

I don't have any universal solution, but possibilities include:
- allowing hidden <input>:s to actually live anywhere (this is
  probably hard to do dtd/validation-wise)
- inventing some hidden postable state that is orthogonal to the
  element structure and thus can be added to any element (maybe 
  an extended version of the data attributes?)
- keeping the whole thing invalid but still define in HTML5 how 
  the migration of ill-placed <input>:s should work

(I did a little research on the last point here:
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-October/016718.html
)

Do you have comments or any other ideas?

Best regards
Mike Wilson

Received on Wednesday, 22 October 2008 11:07:06 UTC