Horje
how to set a default value for a dropdownlist in html with thymeleaf spring Code Example
how to set a default value for a dropdownlist in html with thymeleaf spring
    <label for="drink">Drink</label>
    <select id="drink" name="drink">
        <option th:each="drink : ${drinks}" th:text="${drink.name}"                //drinks are an array of ENUMs here, drink.name are the lowercase equivalent
                th:value="${drink}" th:selected=${drink==customer.drink}></option> //the customer's last drink will be the default
    </select>




Html

Related
how to switch between html pages Code Example how to switch between html pages Code Example
how to link your js file to html Code Example how to link your js file to html Code Example
jquery $ is not defined Code Example jquery $ is not defined Code Example
how to change the preview image of a website Code Example how to change the preview image of a website Code Example
slick slider cdn Code Example slick slider cdn Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8