Re: Forms and Tables

Dave Raggett (dsr@hplb.hpl.hp.com)
Thu, 9 Feb 95 11:53:00 EST

> Since FORMs can't be nested, what problems would we run into with something
> like the following:

> <FORM ...>
> some stuff
> <TABLE>
> <TR><TD>some more stuff<BR>
> <FORM ...>
> still more stuff
> <INPUT TYPE=.....>
> <INPUT TYPE=SUBMIT....>
> </FORM>
> </TD>
> </TR>
> </TABLE>
> this is yet more stuff
> <INPUT TYPE=SUBMIT...>
> </FORM

This would cause problems for parsers. The 2.0 and 3.0 DTD's forbid
nested forms. So the parser upon seeing the second <FORM> element
would terminate the scope of the first one, and signal an error.
The INPUT and </FORM> tags after the table would also cause errors.

You could place two independent forms together side by side, but only
if each form is held in a single cell. This is where the ability to
nest tables comes in. You would use a nested table to lay out the cells
for each of the two forms.

Refer to the 3.0 DTD at http://www.w3.org/hypertext/WWW/MarkUp/MarkUp.html
for futher details on tables.

The 3.0 Internet Draft will make all this quite clear (I hope).

-- Dave Raggett <dsr@w3.org> tel: +44 117 922 8046 fax: +44 117 922 8924
Hewlett Packard Laboratories, Filton Road, Bristol BS12 6QZ, United Kingdom