FORM tag in tables

C

Christian Hauser

Hello all

I'm wondering if there is a recommended position of the form-tag within
tables.

In the following (very simplified) example the form-tag is between <tr>
and <td>, however, I don't know whether this is a good style or not. If
not, where should I place the <form> and </form> tags?

Thank you for any hint,
Christian


<tr>
<form name="..." method="...">
<td>
<table>
<tr>
<td>
...
</td>
<td>
...
</td>
<td>
<select name="...">
<option value=".">...
</select>
</td>
<td>
...
</td>
</tr>
<tr>
...
<td>
<textarea name="..." cols="45" rows="6"></textarea>
</td>
...
</tr>
<tr>
...
</tr>
</table>
</td>
</tr>
<tr>
<td>
...
</td>
</tr>
<tr>
<td>
<input type="submit" value="...">
</td>
</form>
</tr>
 
D

David Dorward

Christian said:
I'm wondering if there is a recommended position of the form-tag within
tables.

There are two ways to mix tables and forms.

* The entire <form> element inside a table data cell
- in which case you have very off tabular data and should read
http://www.allmyfaqs.com/faq.pl?Tableless_layouts

* The entire <table> inside the <form>
- in which case you are considering form data to be tabular data which the
user is entering some of.
- These pages might be useful though:
~ http://www.webweaver.org/dan/css/cssforms.html
~ http://pixy.cz/blogg/clanky/css-fieldsetandlabels.html
~ http://www.realworldstyle.com/forms.html
In the following (very simplified) example the form-tag is between <tr>
and <td>, however, I don't know whether this is a good style or not.

Not only is it bad style, it is not allowed (at least in an HTML document).
 
D

David Dorward

Christian said:
I'm wondering if there is a recommended position of the form-tag within
tables.

There are two ways to mix tables and forms.

* The entire <form> element inside a table data cell
- in which case you have very odd tabular data and should read
http://www.allmyfaqs.com/faq.pl?Tableless_layouts

* The entire <table> inside the <form>
- in which case you are considering form data to be tabular data which the
user is entering some of.
- These pages might be useful though:
~ http://www.webweaver.org/dan/css/cssforms.html
~ http://pixy.cz/blogg/clanky/css-fieldsetandlabels.html
~ http://www.realworldstyle.com/forms.html
In the following (very simplified) example the form-tag is between <tr>
and <td>, however, I don't know whether this is a good style or not.

Not only is it bad style, it is not allowed (at least in an HTML document).

http://validator.w3.org/ is your friend.
 
C

Christian Hauser

David said:
Christian Hauser wrote:




There are two ways to mix tables and forms.

* The entire <form> element inside a table data cell
- in which case you have very odd tabular data and should read
http://www.allmyfaqs.com/faq.pl?Tableless_layouts

* The entire <table> inside the <form>
- in which case you are considering form data to be tabular data which the
user is entering some of.
- These pages might be useful though:
~ http://www.webweaver.org/dan/css/cssforms.html
~ http://pixy.cz/blogg/clanky/css-fieldsetandlabels.html
~ http://www.realworldstyle.com/forms.html




Not only is it bad style, it is not allowed (at least in an HTML document).

http://validator.w3.org/ is your friend.


Thank you.
I will put the whole table in the form tag.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top