Bogdan Onyshenko
Bogdan Onyshenko

Reputation: 436

Email input in Spring MVC

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?

Upvotes: 0

Views: 362

Answers (1)

Kayaman
Kayaman

Reputation: 73568

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" />

Upvotes: 2

Related Questions