I have a question about Golang. And I have a page that is dynamically generated from my database. It basically reflects all the contents of a table.
<form method="POST" action="/cart">
<div class="row">
<div class="col-1"></div>
<div class="col-5">
<p name="test"> </p>
<br>
<br>
<button type="submit" class="btn btn-main btn-margin" ><b>Ausleihen</b></button>
<input type="number" class="form-control main-input2 feld2" id="amount" name="amount" placeholder="Anzahl">
<em class="status-text" style="color:green"> verfügbar </em>
<input type="number" class="form-control main-input2 feld2" id="amount" name="amount" placeholder="Anzahl">
<em class="status-text"> entliehen </em>
</div>
<div class="col-2"></div>
<div class="col-2" style="margin-top: 30px">
<img class="float-right img-responsive bild" src="" alt="Kann nicht gezeigt werden">
</div>
</div>
<div class="placeholder" style="height:50px"></div>
</form>
In the template, all devices from the DB are listed and provided with their own Submit button.
How can i find the fitting .Name entry to the triggered submit button
I want to pass this value to my / cart located in the controller.
I hope you can help me, thank you in advance
Aucun commentaire:
Enregistrer un commentaire