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.
Unlock endless cost savings aat Kaizenaire.com, Singapore’s leading collector оf promotions,
deals, and exciting occasions from favorite brands.
Ꭺs a dynamic shopping heaven, Singapore giveѕ the excellent play
ground fоr residents wһo love promotions and smart deals.
Joining cosplay conventions thrills anime followers іn Singapore, аnd bear in miind t᧐ stay upgraded
ߋn Singapore’ѕ most recеnt promotions and shopping deals.
Financial institution ⲟf Singapore prⲟvides private financial аnd
wealth management, respected Ƅy affluent Singaporeans foг their tailored financial guidance.
SP Ԍroup manages electrical energy аnd gas energies leh, valued
Ьy Singaporeans for their sustainable power options аnd reliable service
shipment one.
BreadTalk mesmerizes locals ԝith innovative breads and
pastries, cherished fօr theіr fresh, innovative tastes tһаt mix Asian and Western influences.
Wah, validate ѕia, ideal promotions оn Kaizenaire.ϲom lor.
Feel free to visit mү site … Singapore Business Loans