In HTML5 we have something like this:
<input type="email" name="email">
In Spring MVC I have a form input with model path just like this:
<form:input path="email" cssClass="form-control" id="firstname" />
And it is treated as text input. Is it possible to change type of the input to email?
CodePudding user response:
You can use HTML5 types (right at the bottom there) by providing them in the type
attribute (the default being "text") e.g.
<form:input type="email" path="email" cssClass="form-control" id="firstname" />