Added checkboxes, that are stored in a map
[demos/spring-boot] / src / main / resources / templates / form.html
index 10ebfaa..533758e 100644 (file)
                 <input type="checkbox" class="form-check-label" th:field="*{inner.option}" />
                 <label class="form-check-label" th:for="${#ids.prev('inner.option')}">Another Option (In An Inner Class)</label>
               </div>
+              <div class="form-group" th:each="key : *{map.keySet()}">
+                <input type="checkbox" class="form-check-label" th:field="*{map[__${key}__]}" />
+                <!-- <label class="form-check-label" th:for="${#ids.prev('map[__${key}__]')}" th:text='|Option "${key}" From The Map|'>Option "KEY" From The Map</label>-->
+                <label class="form-check-label" th:text='|Option "${key}" From The Map|'>Option "KEY" From The Map</label>
+              </div>
             </div>
           </div>
           <div class="card-footer">