I am in process of validating in input from and want that the user input fields should be retain in case of validation error
this is how my input fields are
<form:input path="firstName" class="text short" id="firstName" value="First Name" name ="firstName"/>
my problem is value="First Name", since this is over writing the values which user has filled in and i can not change the HTML , can only add condition in the above input box.
is there any way to solve this issue?
I assume that you want to display “First Name” as a sort of placeholder until the user enters something in. In that case, why don’t you use the
placeholderhtml5 attribute?