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.
Good post. I learn something new and challenging
on sites I stumbleupon every day. It will always be exciting to read articles
from other writers and practice a little something
from other web sites.
Кабанчик (Road to Owner) от cpa.tg — игра-симулятор арбитража в
Telegram. Заходи, забирай стартовые пятаки и жетон входа.
Good day! This is kind of off topic but I need some advice from an established
blog. Is it difficult to set up your own blog?
I’m not very techincal but I can figure things out pretty quick.
I’m thinking about setting up my own but I’m not sure
where to begin. Do you have any points or suggestions?
Cheers
Wonderful goods from you, man. I’ve understand your stuff prior to and you’re just too magnificent.
I really like what you have received here, really like what you’re saying and the way in which you say it.
You make it enjoyable and you continue to care for to
stay it wise. I can’t wait to read much more from you.
That is actually a tremendous site.
Aw, this was a very good post. Taking a few minutes and actual effort to generate a very good article…
but what can I say… I put things off a whole
lot and never manage to get anything done.
Great site you’ve got here.. It’s hard to find good quality writing like yours these days.
I really appreciate people like you! Take
care!!
Pretty! This has been a really wonderful post. Thanks for providing these details.
I think the admin of this site is actually working hard
in support of his site, as here every stuff is quality
based information.
I always spent my half an hour to read this weblog’s posts every day along with a mug of coffee.
Saque rápido via PIX é vida. Entrei no Bikini Paradise com pouco e puxei duzentão rapidinho.
Справді гарна публікація. Приємно читати такі матеріали.
Herе is mү web-site: digital
I know this webhsite provides quality based posts annd extra information, iss
there any other webwite whch provides suh informtion iin quality?
my website; xmxxtube bokep