[ad_1]
I need to disable the radio buttons and show the chosen radio button checked after form submission. Therefore after form submission user can see checked radio button but he/she cannot change it without resetting. How can I do this?
<form th:action="@{/addRating}" th:object="${ratings}" method="post">
<div class="wrapper"></div>
<div>
<input class="input"type="radio" id="rCorrect" name="rg1" value="+1" th:field="*{ratingValue}">
<label for="rCorrect" class="fas fa-star fa-xl" ></label>Rate as a correct answer
</div><br>
<div>
<input class="input" type="radio" id="rWrong" name="rg2" value="-1" th:field="*{ratingValue}">
<label for="rWrong" class="fas fa-star fa-xl"></label>Rate as a incorrect answer
</div>
<input class="Danger" type="reset" value="Reset">
<input type="submit" value="Submit">
</form>
[ad_2]