By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,846 Members | 2,107 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,846 IT Pros & Developers. It's quick & easy.

Problem with Validator: Form spanning accross table rows does notvalidate

P: n/a
Hi

Unfortunately, I am limited to using tables for part of my current
project. I have a form that spans across a number of TR and TD in the
shape of checkboxes.

Doctype is XHTML 1.0 Transitional, Encoding is utf-8

Is there anything wrong?
Should I try something else? What in that case?

Thanks for the help
:)

#################
Copy of Markup Validation Service v0.6.7 report:

Below are the results of attempting to parse this document with an SGML
parser.

Line 77, column 5: end tag for "form" omitted, but OMITTAG NO was specified

</td>

You may have neglected to close a tag, or perhaps you meant to
"self-close" a tag; that is, ending it with "/>" instead of ">".
Line 71, column 1: start tag was here

<form class="select" method="post" action="post.php">

Line 173, column 28: end tag for element "form" which is not open

<td class="td-title"></form>
Jul 20 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
L Major wrote:
Hi

Unfortunately, I am limited to using tables for part of my current
project. I have a form that spans across a number of TR and TD in the
shape of checkboxes.

Doctype is XHTML 1.0 Transitional, Encoding is utf-8

Is there anything wrong?
Should I try something else? What in that case?

Thanks for the help
:)

#################
Copy of Markup Validation Service v0.6.7 report:

Below are the results of attempting to parse this document with an SGML
parser.

Line 77, column 5: end tag for "form" omitted, but OMITTAG NO was specified

</td>

You may have neglected to close a tag, or perhaps you meant to
"self-close" a tag; that is, ending it with "/>" instead of ">".
Line 71, column 1: start tag was here

<form class="select" method="post" action="post.php">

Line 173, column 28: end tag for element "form" which is not open

<td class="td-title"></form>


Additionally, after reading:
10.3. How can I use tables to structure forms?
at: http://www.htmlhelp.com/faq/html/tab...ml#table-forms

I am still at a loss. I have 3 forms all contained within ONE table. Two
of the forms are enclosed within one TD which is fine but another one
runs across a few.

Here is an over simplified pseudo layout.

Tnx
:)

<table border="0">
<tr><td><form one></form></td></tr>
<tr><td><form two></td></tr>
<tr><td><input type="checkbox" /></td></tr>
<tr><td><input type="checkbox" /></td></tr>
<tr><td><input type="checkbox" /></form></td></tr>
<tr><td><form three</form></td></tr>
</table>
Jul 20 '05 #2

P: n/a
L Major wrote:
Hi

Unfortunately, I am limited to using tables for part of my current
project. I have a form that spans across a number of TR and TD in the
shape of checkboxes.


You have to enclose the table completely inside the form element.
eg.
<form ...>
<table>
...
</table>
</form>

We need to see your document to actually diagnose the problem, a URI
would be nice, but I take a guess at what you doing wrong anyway.

You *cannot* do this, or similar:

<table>
<tr>
<td>
<form ...>
<label><input ...>label 1</label>
</td> <!-- Note: td closed before open form element -->
<td>
<label><input ...>label 2</label>
</form>
</td>
</tr>
<table>

If this is nothing at all like your problem, sorry, it's the best I can
do with the limited description provided by validator, without seeing
your actual document.

--
Lachlan Hunt
http://www.lachy.id.au/

Please direct all spam to ab***@127.0.0.1
Thank you.
Jul 20 '05 #3

P: n/a
Lachlan Hunt wrote:
L Major wrote:
Hi

Unfortunately, I am limited to using tables for part of my current
project. I have a form that spans across a number of TR and TD in the
shape of checkboxes.

You have to enclose the table completely inside the form element.
eg.
<form ...>
<table>
...
</table>
</form>

We need to see your document to actually diagnose the problem, a URI
would be nice, but I take a guess at what you doing wrong anyway.

You *cannot* do this, or similar:

<table>
<tr>
<td>
<form ...>
<label><input ...>label 1</label>
</td> <!-- Note: td closed before open form element -->
<td>
<label><input ...>label 2</label>
</form>
</td>
</tr>
<table>

If this is nothing at all like your problem, sorry, it's the best I can
do with the limited description provided by validator, without seeing
your actual document.


Thank you Lachlan.
I seem to have posted a clarification as you were posting. You are
correct in saying that I have a form running across several TD tags.

AFA, URL, project is not on line yet.

I hope my second post has clarified the position somehow.
I am open to suggestion regarding the situation.
TIA
:)
Jul 20 '05 #4

P: n/a
L Major <lm****@hot.com> wrote:
Additionally, after reading:
10.3. How can I use tables to structure forms?
at: http://www.htmlhelp.com/faq/html/tab...ml#table-forms
Thank you, thank you, thank you, thank you, thank you, thank you,...
I am still at a loss. I have 3 forms all contained within ONE table. Two
of the forms are enclosed within one TD which is fine but another one
runs across a few.


That is not an option.

You can have a single FORM element inside a single TD (or TR) element, or
you can have a single FORM element containing the entire TABLE element.

There are a couple ways to do what you're trying to do. You could split up
the table into three tables, one for each form, and hope the columns line
up. Or you could use a single form with multiple submit buttons, and have
the form do different things depending on which submit button was used.
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"There are three kinds of people: those who can count and those who can't."
Jul 20 '05 #5

P: n/a

"L Major" <lm****@hot.com> wrote in message
news:4N********************@eclipse.net.uk...
I am still at a loss. I have 3 forms all contained within ONE table. Two
of the forms are enclosed within one TD which is fine but another one
runs across a few.

Here is an over simplified pseudo layout.

Tnx
:)

<table border="0">
<tr><td><form one></form></td></tr>
<tr><td><form two></td></tr>
<tr><td><input type="checkbox" /></td></tr>
<tr><td><input type="checkbox" /></td></tr>
<tr><td><input type="checkbox" /></form></td></tr>
<tr><td><form three</form></td></tr>
</table>


You can't have a FORM element that starts inside a TD element and doesn't
end inside it. More generally, nowhere in HTML can you have an element that
starts inside another element and ends outside of it, or vice versa. For two
elements A and B, either (1) A contains B, (2) B contains A, or (3) A and B
are completely separate.

Jul 20 '05 #6

P: n/a
Darin McGrew wrote:
L Major <lm****@hot.com> wrote:
Additionally, after reading:
10.3. How can I use tables to structure forms?
at: http://www.htmlhelp.com/faq/html/tab...ml#table-forms

Thank you, thank you, thank you, thank you, thank you, thank you,...

I am still at a loss. I have 3 forms all contained within ONE table. Two
of the forms are enclosed within one TD which is fine but another one
runs across a few.

That is not an option.

You can have a single FORM element inside a single TD (or TR) element, or
you can have a single FORM element containing the entire TABLE element.

There are a couple ways to do what you're trying to do. You could split up
the table into three tables, one for each form, and hope the columns line
up. Or you could use a single form with multiple submit buttons, and have
the form do different things depending on which submit button was used.


Thank you Darin and Harlan.

But that is the 64,000 question. I released that it is causing problem,
however, alternatives are not easy to find.

The mentioned form is rather complicated. It is part of a BBS. Each
forms contains a number of arrays of data, multiple fields [20+] based
inside a CMS system built around a single table. I do not believe in
nested tables and it wouldn't have worked in this case anyway. It would
not be possible to put form tags outside the table and there are other
reasons why forms can not be merged [each of above forms are already
been constructed by merging a number of forms in the first place].

It would be possible to break the form into its components and that
would mean 20+ [can be 50] forms, one in each TD instead of one for all.
Other problems are that, users can not select multiple checkboxes any
more and would be limited to one checkbox at a time which is impractical.

I am stuck.

:(
Jul 20 '05 #7

P: n/a

"L Major" <lm****@hot.com> wrote in message
news:a5********************@eclipse.net.uk...
Darin McGrew wrote:
L Major <lm****@hot.com> wrote:
Additionally, after reading:
10.3. How can I use tables to structure forms?
at: http://www.htmlhelp.com/faq/html/tab...ml#table-forms

Thank you, thank you, thank you, thank you, thank you, thank you,...

I am still at a loss. I have 3 forms all contained within ONE table. Two
of the forms are enclosed within one TD which is fine but another one
runs across a few.

That is not an option.

You can have a single FORM element inside a single TD (or TR) element, or you can have a single FORM element containing the entire TABLE element.

There are a couple ways to do what you're trying to do. You could split up the table into three tables, one for each form, and hope the columns line up. Or you could use a single form with multiple submit buttons, and have the form do different things depending on which submit button was used.


Thank you Darin and Harlan.

But that is the 64,000 question. I released that it is causing problem,
however, alternatives are not easy to find.

The mentioned form is rather complicated. It is part of a BBS. Each
forms contains a number of arrays of data, multiple fields [20+] based
inside a CMS system built around a single table. I do not believe in
nested tables


I'm not familiar with that religion. Philosophically speaking, one shouldn't
use tables for layout at all, but if you're going to, there's nothing
whatsoever wrong with nesting them.

Another option is to have a table *inside* each form, instead of multiple
forms inside one table. You may lose uniformity of horizontal layout, but
that may not be important.

Of course, without seeing what you're trying to do, it's difficult to make
more specific suggestions.
and it wouldn't have worked in this case anyway. It would
not be possible to put form tags outside the table and there are other
reasons why forms can not be merged [each of above forms are already
been constructed by merging a number of forms in the first place].

It would be possible to break the form into its components and that
would mean 20+ [can be 50] forms, one in each TD instead of one for all.
Other problems are that, users can not select multiple checkboxes any
more and would be limited to one checkbox at a time which is impractical.

I am stuck.

Jul 20 '05 #8

P: n/a
Harlan Messinger wrote:
"L Major" <lm****@hot.com> wrote in message
news:a5********************@eclipse.net.uk...
Darin McGrew wrote:
L Major <lm****@hot.com> wrote:
Additionally, after reading:
10.3. How can I use tables to structure forms?
at: http://www.htmlhelp.com/faq/html/tab...ml#table-forms
Thank you, thank you, thank you, thank you, thank you, thank you,...

I am still at a loss. I have 3 forms all contained within ONE table. Two
of the forms are enclosed within one TD which is fine but another one
runs across a few.
That is not an option.

You can have a single FORM element inside a single TD (or TR) element,
or
you can have a single FORM element containing the entire TABLE element.

There are a couple ways to do what you're trying to do. You could split
up
the table into three tables, one for each form, and hope the columns
line
up. Or you could use a single form with multiple submit buttons, and
have
the form do different things depending on which submit button was used.


Thank you Darin and Harlan.

But that is the 64,000 question. I released that it is causing problem,
however, alternatives are not easy to find.

The mentioned form is rather complicated. It is part of a BBS. Each
forms contains a number of arrays of data, multiple fields [20+] based
inside a CMS system built around a single table. I do not believe in
nested tables

I'm not familiar with that religion. Philosophically speaking, one shouldn't
use tables for layout at all, but if you're going to, there's nothing
whatsoever wrong with nesting them.

Another option is to have a table *inside* each form, instead of multiple
forms inside one table. You may lose uniformity of horizontal layout, but
that may not be important.

Of course, without seeing what you're trying to do, it's difficult to make
more specific suggestions.

and it wouldn't have worked in this case anyway. It would
not be possible to put form tags outside the table and there are other
reasons why forms can not be merged [each of above forms are already
been constructed by merging a number of forms in the first place].

It would be possible to break the form into its components and that
would mean 20+ [can be 50] forms, one in each TD instead of one for all.
Other problems are that, users can not select multiple checkboxes any
more and would be limited to one checkbox at a time which is impractical.

I am stuck.


Tnx. I will have to think more about it and see if I can come up with an
alternative approach.

Tnx
:)
Jul 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.