You can't have a <form>
directly inside a <tr>
, so the invalid HTML is probably being tossed.
Given your <form>
and input elements, it looks like this layout for a row would work:
<tr>
<td>Value1</td>
<td>
<form>
<input type="hidden" name="id" value="1"/>
<button>Submit</button>
</form>
</td>
</tr>
Alternatively if you're submitting via AJAX, you could serialize the row yourself, but this approach won't degrade well, so I'd advise against it when possible. IMO <form>
tags should be able to encapsulate a row, it'd be tremendously handy, unfortunately that's not the case.
Nick Craver
2010-09-02 12:03:20