In a hypothetical situation with a datatable
, asynchronously a swith
of ativo/inativo
will be made to the registry.
Should I create a form for each row / record in that datatable? Is it semantically incorrect? Or should I manipulate the data through ids
, data attributes
, etc ...?
For example, this would be something like:
<table>
<thead>
<th>
<td>Nome</td>
<td>Ativo</td>
</th>
</thead>
<tbody>
<form id="1">
<tr>
<td>Fulano</td>
<td>
<input type="checkbox" name="ativo">
</td>
</tr>
</form>
<form id="2">
<tr>
<td>Cicrano</td>
<td>
<input type="checkbox" name="ativo">
</td>
</tr>
</form>
</tbody>
</table>