Is it OK to write a form within the tr tag?
<table>
% for my $word ( @$words_2 ) {
<tr>
<form action="/blacklist" method="post">
<td><%=$word%></td>
<td><input type="text" name="data" readonly hidden value="<%=$word%>" /></td>
<td><input class="remove" type="submit" value="Remove" /></td>
</form>
</tr>
% }
</table>
The
trdoesn’t allowform-tags as direct children. Most modern browsers will let you do a lot of crap and so you could use this – but I wouldn’t call it OK. A better approach would be to but the complete form into one of thetds (tds allow text, forms, inline- and block-elements as children):or, a lot easier, simply use a link (but note that
datagets sent usingGETinstead ofPOST– maybe you’ll have to change something in your code that handles the blacklisting):