Play Framework HTML5 input elements

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.

11 thoughts on “Play Framework HTML5 input elements

  1. Stay ahead in the world of horse racing with Gallop News. Our platform provides the latest news on horse racing events across the UK. Enjoy in-depth race reviews from our experienced team. Whether you are a casual fan or a seasoned bettor Gallop News offers industry trends to enhance your horse racing experience. Subscribe and never miss an update from Gallop News

  2. His father strokes his own cock in the shower the dew from his cock mixes with the drops condensing on the glass. url=https://arturzasada.pl/gay sex porn/url His father’s words are what he hears when he erupts. His cum streaming like liquid threads from the pee-hole of his rigid cock.

  3. “This is what a man looks like son.” His father says as his pants fall to the floor. From his waist out pops his representation of a 40-year-old-man. And father of two teenage boys. His cock. “I’m am nearly 6 foot 2 inches tall dad. I weigh 210 lbs. I think dad. At least I was the last time we were weighed at football practice.” The son says. “Much bigger than you I should say.”

  4. “Last I measured I was nearly eight inches dad. Maybe more. I may be even bigger who knows.” He answers nonchalantly. The now lukewarm water streams through the curls of his hair rinsing away the last vestiges of the soapy lather. It all goes down the drain in a swirl of bubbles.

  5. “Yes, sir.” He says as he straightens up, standing erect as his member pulses to life between his legs, and in his father’s right hand, which are firmly locked on his balls. “Yes, sir, I do.”

  6. “Let me get in there, Garrett.” His father says, as his son steps aside so he can get into the shower enclosure.

  7. However, after correction, the top correlations for these genes were enriched for carbohydrate metabolism and hematopoietic differentiation, respectively both overlap P values what is priligy tablets constipation dry mouth excessive tiredness pain in the back or muscles headache dizziness difficulty falling asleep or staying asleep anxiety difficult, painful, or frequent urination cough toothache blurred vision or other vision changes dry eyes

  8. delayed reconstruction with a tissue expander, breast implant, or autologous tissue flap that takes place sometime after a mastectomy or lumpectomy surgery and after other breast cancer treatments are completed paxil or priligy Willard LdjxrvKjTEf 6 27 2022

  9. CAS 911- 45- 5 free base [url=https://fastpriligy.top/]dapoxetine for premature[/url] 05; and for acute phase reactants, ESR, SMD 8

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>