Persisting objects to a database using a loop
- by ChaoticLoki
I have a form that returns multiple values and each value I would like to store in a database,
I created a test form for this purpose
<form method="post" action="{{ path('submit_exercise', {'page': 1}) }}">
<input type="hidden" name="answers[]" value="Answer 1" "/>
<input type="hidden" name="answers[]" value="Answer 2"…