W3C home > Mailing lists > Public > public-html@w3.org > April 2008

Re: Nested forms

From: Philip Taylor <pjt47@cam.ac.uk>
Date: Sat, 26 Apr 2008 17:48:09 +0100
Message-ID: <48135CC9.2020002@cam.ac.uk>
To: Ben Boyle <benjamins.boyle@gmail.com>
CC: HTML WG <public-html@w3.org>, Henri Sivonen <hsivonen@iki.fi>

Ben Boyle wrote:
> Could you also use separate forms and use css to position them in the
> layout you desire?

That would break the tab ordering of the form controls, since tabbing is 
usually dependent on the document order and not the visual order. It 
could be fixed with tabindex, but that seems likely to break navigation 
more badly in other ways.

Also, I'm not sure exactly how CSS positioning could be used here, 
particularly since the 'Photo' row can change in size (e.g. if you 
upload a taller/narrower image and it dynamically updates the thumbnail) 
and require the following rows to shift up/down a little. (I forgot to 
mention that in the initial description, but I hope nobody minds me 
changing the requirements now :-) )

> Is there a need for the nesting beyond the intended layout?

No - I would be happy if the forms weren't nested, as long as the layout 
is preserved. (The layout (i.e. the hoped-for quality of the user 
experience) is more important than being conforming HTML, as long as it 
still works for users, so I don't want to change the layout.)

> If it's just about uploading the file... maybe more work on file
> inputs can address this?
> e.g. <input type="file" required> ... could this require that the file
> is uploaded before progressing?

I don't want to require the file - I just want the ability to submit it 
in a form, independently of another form which surrounds it. The <input 
form> attribute in WF2 (as Henri mentioned) seems to solve that problem 
in an HTML5 UA, but I want to write HTML5 pages that works well in 
pre-HTML5 UAs (as in the "Degrade Gracefully" design principle), so the 
solution can't rely on any new functionality that isn't already implemented.

This might be a sufficiently obscure case that the cost of having HTML5 
say it's conforming is greater than the cost of forcing me to write 
non-conforming code. (A static validator wouldn't even detect that this 
was non-conforming, since I have to rely on scripting to create the 
nested forms). I'd be happy with that conclusion, as long as all the 
relevant information is considered when making that decision.

> cheers
> Ben

Philip Taylor
Received on Saturday, 26 April 2008 16:49:04 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:32 UTC