Based on checkbox state i want to enable button if this checkbox is checked and vice versa using thymeleaf with springboot. Here is what i tried :
<div>
<label>
<input type="checkbox" th:value="${test}">
actif
</label>
</div>
<div>
<button [disabled]="${test == false}" type="submit">Envoyer</button>
</div>
In my contoller :
private boolean test = false;
model.addAttribute("test", test);