Springでtymeleafを使ってwebシステムを作っています。
Listを渡して明細行をeachで作成したいのですが、明細内のradioがすべて同じnameで出来てしまい、明細ごとにラジオボタンで選択することができません。
明細1行ごとに独立したradioグループにするにはどうすればよいでしょうか?
<td class="woh"> <div class="form-check-inline "> <div class="workday"> <th:block th:each="type, stat : ${form.TypeList}"> <input th:value="${type.value}" th:text="${type.text}" th:field="${form.detailFormList[__${stat.index}__].type}" type="radio" class="form-check-input me-1" id="open1" name="status1"> <label th:field="${form.detailFormList[__${stat.index}__].type}" for="open1" class="me-3"></label> </th:block> </div> </div> </td>

回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。