I want to add multiple textbox(s) depending on the Id value from a dropdown list. For example, if i select Option1 i need to add two dynamic text box. If i select Option 2, i need to add 5 text boxes.
Thymleaf:
        <div>
        <label>Source Id:</label>
        <select th:field="*{id}">
            <option th:each="p : ${listId}" th:value="${p}" th:text="${p}" />
        </select>
        <span th:if="${#fields.hasErrors('Id')}" th:errors="*{id}">Id error</span>
        </div>