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.
Hi there, this weekend is pleasant in favor of me, since this moment i am
reading this great informative piece of writing here at my house.
نتیجهگیری اینکه
برای کسانی که میخوان
کازینو اینترنتی
میگردن
این مجموعه آنلاین
به خوبی میتونه
کمککننده باشه
در ضمن
پروژههایی مثل
enfejaronline جدید
و
sibbet جدید
جایگاه خوبی دارن
در آخر کار
ازش راضی بودم
و
بدون تردید
حتما برمیگردم
my blog :: سلامت روان
I enjoy what you guys are usually up too. Such clever work
and reporting! Keep up the good works guys I’ve incorporated you guys
to my own blogroll.
my web-site: best real estate agent in Crown Point IN
Every weekend i used to pay a quick visit this web site, as
i wish for enjoyment, for the reason that this this website conations really good funny information too.
Feel free to visit my blog: realtor in Schaumburg IL
Hey there are using WordPress for your blog platform?
I’m new to the blog world but I’m trying to get
started and set up my own. Do you need any html coding expertise to make your own blog?
Any help would be really appreciated!
Documented losing days became badges of discipline in the community.