There is the following problem:
<form>
<input name="checkbox" type="checkbox"></input>
<input name="value" type="text"></input>
<input name="checkbox" type="checkbox"></input>
<input name="value" type="text"></input>
...
</form>
The user enters a phrase and indicates whether it is the correct answer. Is there any way to combine these into unique pairs when sending them so that they don’t get mixed up on the server?
At the moment, I solve it this way: when opening, a script is launched that runs through the passivity of the checkboxes and texts and combines the values of the text field and the checkbox into a string separated by “^”. The problem is that user input can be anything and it looks like a terrible crutch.
Владислав Копнин is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.