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.
광명출장마사지는 경기도 광명 지역에서 고객이 있는 숙소나 자택으로 마사지사가 직접
방문하여 서비스를 제공하는 형태를 의미합니다.
주된 이용 목적은 피로 회복이나 휴식이며
Cabinet IQ
8305 Statе Hwy 71 #110, Austin,
TX 78735, United States
254-275-5536
Specialoffer
You’ve made some good points there. I looked on the
net to find out more about the issue and found most people
will go along with your views on this site.
I do not even know how I ended up here, but
Cheers!
I thought this post was great. I don’t know who you are but definitely you are going to a
famous blogger if you aren’t already