+<!DOCTYPE html>
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+ <title>Demo: Behavior Of A Checkbox</title>
+ <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
+ </head>
+ <body>
+ <nav class="navbar navbar-dark bg-primary navbar-expand navbar-dark flex-column">
+ <h1 class="navbar-brand">Demo: Behavior Of A Checkbox</h1>
+ </nav>
+ <main class="container mt-5">
+ <form action="#" th:action="@{/}" th:object="${form}" method="get">
+ <div class="card my-3">
+ <div class="card-header">Select / unselect the option and submit the form...</div>
+ <div class="card-body">
+ <div class="card-text">
+ <div class="form-group">
+ <input type="checkbox" class="form-check-label" th:field="*{option}" />
+ <label class="form-check-label" th:for="${#ids.prev('option')}">Fancy Option To Choose</label>
+ </div>
+ </div>
+ </div>
+ <div class="card-footer">
+ <button type="submit" class="btn btn-primary">Submit</button>
+ </div>
+ </div>
+ </form>
+ </main>
+ </body>
+</html>