The built in Play input elements are fairly restrictive in that you can’t specify the input type. I wrote a helper template that you can use to generate input elements which have HTML5 type attributes such as url, email, number, search etc. etc.
All you have to do is call the template method, passing the HTML input type as a parameter. For example:
@helper.html5.input(form("website"), '_label -> "Website:", 'type -> "url")
If you have a form field mapped as a play.api.data.Forms.email then the template will automatically infer it’s type so you don’t have to pass the type attribute in with your html attributes:
@helper.html5.input(form("email"), '_label -> "Email:")
If your field has the required constraint, e.g. it is a “nonEmptyText” then the template will add the HTML5 “required” attribute to the field as well.
You can get the source code here.
handicap en las mejores casas de apuestas en méxico (Bryce)
Wonderful blog! I found it while browsing on Yahoo News.
Do you have any tips on how to get listed in Yahoo News?
I’ve been trying electric bike for adults a while but I never seem
to get there! Thank you
It’s very simple to find out any topic on web as compared to textbooks, as I found this post at this site.
This site was… how do you say it? Relevant!!
Finally I’ve found something that helped me. Cheers!
Excellent way of telling, and fastidious article to obtain facts
on the topic of my presentation topic, which i am going to convey in school.