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.
Hey there are using WordPress for your blog platform?
I’m new to the blog world but I’m trying to get started and create my own. Do you need any
html coding expertise to make your own blog?
Any help would be greatly appreciated!
It’s genuinely very complicated in this active life to listen news on Television, therefore
I simply use internet for that reason, and get the hottest information.
Hmm is anyone else experiencing problems with the pictures on this blog loading?
I’m trying to find out if its a problem on my end or if it’s the
blog. Any responses would be greatly appreciated.
Hey just wanted to give you a brief heads up and let you
know a few of the pictures aren’t loading correctly.
I’m not sure why but I think its a linking issue. I’ve
tried it in two different web browsers and both show the
same results.
Here is my webpage … 20 Foot Shipping Container For Sale Near Me
My spouse and I stumbled over here different web page and thought
I might check things out. I like what I see so now i am following you.
Look forward to looking at your web page repeatedly.
I am really impressed with your writing talents as well as with the layout to your blog.
Is that this a paid theme or did you modify it yourself? Either way stay up the nice high
quality writing, it’s uncommon to see a great blog like this
one today..
my page – electric bike for adults
Hi, i think that i saw you visited my site so i came to
“return the favor”.I am trying to find things to improve my website!I suppose its ok to use some of your ideas!!
I simply couldn’t leave your website before suggesting that I actually loved the standard information an individual supply to your guests?
Is gonna be again steadily to inspect new posts
Whoa! This blog looks exactly like my old one!
It’s on a entirely different topic but it has pretty much the same page layout
and design. Great choice of colors!
android top 100 Wedden Sites trucs 2026