I attempted to create a dynamic form with radio buttons, but I am facing issues in getting the form to function properly.
Here is my code:
<tr ng-repeat="i in [1,2,3] track by $index">
<td><input type="text" class="form-control"></td>
<td>
<label>
<input ng-model="$parent.reservation.gender" type="radio"
name="gender.$index"
value="male" checked>
Male
</label>
<label>
<input ng-model="$parent.reservation.gender" type="radio"
name="gender.$index"
value="female" checked>
Female
</label>
</td>
<td><input type="text" class="form-control"></td>
</tr>
In my situation, I need to select the gender for each row, but I am struggling to configure the parameters correctly to make it work.