I am trying to make it so that when a user selects a checkbox then hits a button (not shown in the code below) that they will be redirected to a new page with certain details inside it. I need to get the asset.id
value out for this. My issue is that I am not sure where to start for getting just those values out and making them work with a submit
button.
HTML
<thead>
<tr>
<th>Select</th>
<th>Model</th>
<th>Asset Number</th>
<th>Warranty</th>
<th>Notes</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for asset in assets %}
<tr>
<td><input type="checkbox"/></td>
<td>{{asset.model}}</td>
{% if loop.first %}<td class="tour-step tour-step-sixteen"><a href="/dashboard/it/asset/{{asset.id}}">{{ prefix }}{{asset.assetNumber}}</a></td>
{% else %}
<td><a href="/dashboard/it/asset/{{asset.id}}">{{ prefix }}{{asset.assetNumber}}</a></td>
{% endif %}
<td>{{asset.warranty | date("y-m-d")}}</td>
<td>{{asset.notes}}</td>
<td>
<form id="label-form" action="/dashboard/it/label/print" method="POST">
<button type="submit" class="btn btn-danger"><i class="fa fa-trash-o"></i></button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
I have no JS yet because I am not sure how I would even start getting the values I need and how to save/ pass them onto my POST
route. Even guidance would be great.
I have spent 3.5 hours now looking online but no solution I have found seems complete they all lack something or are for single values not multiple like I need to have.