I have a problem as mentioned in the title.
The input field is of type number.
The th:field refers to an int attribute in the database.
I want my placeholder to be visible instead of the default 0 value.
<input id="courseCredits" name="courseCredits" th:field="*{courseCredits}" class="form-control" placeholder="Course Credits" type="number" min="0" required autofocus/>
If you don't want the default of 0 you can't use an int. Instead use an Integer with null for empty.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With