Multiple forms in one table, these forms last for varying lengths of rows, however this does not seem to work:
<table>
<form>
<tr>
<td>
</td>
<td>
</td>
</tr>
</form>
<form>
<tr>
<td>
</td>
<td>
</td>
</tr>
</form>
</table>
I believe a table has a definite structure, and this cannot be interlaced with other structures, but is there a tidy work around this?
Thanks.
Tables and forms can be nested either way. But if you put forms into tables, each form must be completely included into a single table cell (one TD element in practice).
To make a table in HTML, use the <table> tag. Within this table tag, you'll place the <tr>, <th>, and <td> tags. The <tr> tag defines a table row. The <th> tag defines the table header.
Definition and Usage. The <fieldset> tag is used to group related elements in a form. The <fieldset> tag draws a box around the related elements.
No. According to this document: http://www.w3.org/TR/html401/struct/tables.html#h-11.2.1 table may contain only these:
TABLE --
(CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
But you can use something like this
<div class=table>
<form>
<div class=cell>...</div>
<div class=cell>...</div>
</form>
</div>
with styles:
div.table { display:table; }
div.table > form { display:table-row; }
div.table > form > div.cell { display:table-cell; }
No, you can't do that. I guess you want it that way to have both forms aligned in a table, right?
If you are allowed javascript on the page, you could add the different text boxes etc. inside the <td>
elements, and attach onchange
event handlers to these boxes to populate the corresponding (hidden) fields in your actual forms.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With