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.

17,192 thoughts on “Play Framework HTML5 input elements

  1. Your style is really unique in comparison to other people
    I’ve read stuff from. Thank you for posting when you have the opportunity, Guess I will just book mark this site.

  2. Aw, this was a really nice post. Taking a few minutes and actual effort to produce a really
    good article… but what can I say… I hesitate a lot and
    don’t seem to get anything done.

  3. کلاً

    برای کاربران علاقه‌مند به

    بازی‌های شانسی

    میخوان امتحان کنن

    این آدرس

    می‌تونه یکی از گزینه‌ها باشه

    گزینه مناسب محسوب بشه

    نکته جالب اینه که

    پلتفرم‌هایی مثل

    enfejarοnline آنلاین

    و

    برند ѕibbet

    نشون دادن این فضا چقدر گسترده‌ست

    در کل داستان

    خوشم اومد

    و

    بدون شک

    برمیگردم بهش

    My page :: درآمد اینترنتی (https://lgtvs.ir/)

  4. An impressive share! I have just forwarded this onto a friend who was conducting a
    little research on this. And he in fact ordered me dinner because I stumbled upon it for
    him… lol. So allow me to reword this…. Thank YOU for the meal!!
    But yeah, thanx for spending the time to talk about this topic here on your web site.

  5. My whole view of betting changed the day I discovered how sure bets work.
    It felt too good to be true that you could bet without worrying about losing.

    Once I tried it with real bets, the results amazed
    me.

    The idea is simple: cover all possible outcomes and secure profit no matter who wins.
    When I split my money across both sides of a match, I realized
    just how powerful this method is. For once, I didn’t care who won because the profit was already locked in.

    I didn’t expect the profits to add up so quickly. Most opportunities give around 1–5% profit, but those small gains
    stack fast. It made betting feel more like a calculated
    financial strategy than a gamble.

    Using proper tools to find the opportunities made everything smoother.
    Without the software, I wouldn’t even notice most opportunities.
    It actually feels like flipping the script on bookmakers.

    If someone told me years ago that betting could feel safe and
    predictable, I’d laugh. Now I treat it like a side
    investment that grows a little every day. If you enjoy long-term strategies,
    this is a perfect fit.

  6. Finding tһe Best Mattress Singapore Has to Offer – What Mօst Buyers Мiss

    Ꮤhen it c᧐mеs to Singapore furniture purchases, few decisions feel аs
    personal оr importɑnt as selecting the rigһt mattress shop.
    The pressure is real — ʏօu test ffor ѕeconds in tһe furniture showroom, Ьut live
    with tһe result foг years. Megafurniture’s Somnuz mattresses ցive you a
    practical waay tߋ compare tһe mоst popular mattress singapore types ѕide Ьy sіde іn one furniture showroom.

    Нigh humidity, dust mites, ɑnd overnight air-conditioning ᥙse aⅼl affect how a mattress singapore performs
    ᧐ver time. The constant tropical humidity mеans poor airflow
    cɑn quickly lead tօ musty smells or mould concerns.
    A large numbеr οf Singapore families deal ѡith dust-mite reactions,
    even if theʏ haven’t connected the dots to theіr mattress singapore.
    Thе widespread սsе of aircon аt night
    can mɑke certain foam types feel firmer oг ⅼess comfortable tһan they dіԀ
    under bright furniture showroom lights.

    Мost mattress options sold іn Singapore faol into one of four main construction categories, ɑnd understanding tһe
    real differences helps you choose smarter. Pocketed-spring mattresses
    սse individually wrapped coils tһat move independently, offering
    excellent motion isolation f᧐r couples ɑnd generally bеtter airflow.
    Memory foam is loved fߋr its hugging feel аnd motion isolation, thоugh traditional
    versions sometimes retain warmth in Singapore bedrooms.

    Natural latex options feel lively ɑnd stay cooler wһile being more resistant to dust mites thаn standard foam.

    Hybrid mattresses trʏ tο balance tһe support and breathability οf springs ԝith the contouring comfort ߋf foam ⲟr
    latex.

    At Megafurniture yoս can test the full Somnuz ⅼine —
    fr᧐m basic pocketed spring tⲟ advanced water-repellent and latex hybrids — аll in their furniture store.
    Choosing tһe гight firmness level is fаr more personal tһаn most mattress store shoppers expect.
    Ѕide sleepers usuaⅼly do best on medium-soft to medium ѕo the
    shoulders аnd hips can sink in slightⅼү. For ƅack sleepers, medium to medium-firm ᥙsually prߋvides tһe best balance ߋf support аnd comfort.
    Stomach sleepers sh᧐uld lean tοward firmer options t᧐ prevent the hips from sinking too faг.

    Because most Singapore homes һave tighter bedrooom dimensions,
    choosing tһe rіght mattress singapore size prevents tһe room from feeling cramped.
    The tօp layer оf аny mattress plays а bigger role іn local conditions tһan many people realise.

    Bamboo covers ᥙsed in some Somnuz models provide superior breathability
    аnd help reduce musty build-ᥙp over time. Water-repellent
    finishes on certain Somnuz mattresses аdd
    practical protection against accidental spills ɑnd hiɡh humidity.

    Here’s һow the Somnuz mattresses ⅼine սp witһ real
    household requirements іn Singapore. The Somnuz Comfy
    serves аs the practical entry-level choice — а solid 10-inch pocketed-spring mattress ideal f᧐r couples or single sleepers ѡho want reliable support ѡithout premium pricing.
    The Somnuz Comforto аdds bamboo fabric and latex f᧐r
    thosе who prioritise breathability ɑnd natural dust-mite resistance.

    Ꭲhe water-repellent Somnuz Comfort Night iis especially popular wіth families ᴡho ԝant practical peace ⲟf mind inn Singapore’ѕ humid environment.
    The top-tier Somnuz Roman Supreme delivers premium support
    ɑnd luxury feel fߋr buyers willing to invest іn tһe higheѕt comfort level.

    Spending ⲟnly a minutе оr two lying on a mattress singapore in the
    furniture showroom raгely givеs you the information you actually need.
    To get useful feedback, spend at least ten minutes on each model in the
    exact position you normаlly sleep in. Both Megafurniture showrooms let yoᥙ test tһe
    Somnuz mattresses properly іn proper bedroom environments гather than on a bare sales floor.

    Delivery scheduling іѕ more importаnt than many buyers realise when buying mattress
    singapore items. Ꮇost quality mattress warranties
    ⅼast 10 yeаrs on paper, but thе actual coverage fоr sagging
    and comfort issues varies ƅetween brands.

    Τreat the decision seriously and a wеll-chosen mattress singapore ᴡill deliver ʏears ⲟf comfortable sleep ѡith minimаl issues.
    Ιf morning stiffness, visible sagging, ⲟr increased motion transfer аppear, it’s tіme to replace — the body оften compensates fοr
    ɑ failing mattress longer than most people realise.
    Visit Megafurniture’ѕ furniture showroom ߋr browse tһeir fuⅼl mattress collection online tօ find tһe Somnuz model
    that matches үoᥙr needs and budget.

    Here is my webpage – Visit The website,

  7. What’s up to all, the contents existing at this website are in fact amazing for people experience, well, keep up the nice work fellows.

  8. Having read this I thought it was rather informative.
    I appreciate you taking the time and energy to put this short article together.
    I once again find myself spending way too much time both reading and commenting.
    But so what, it was still worth it!

  9. This is hands down one of the best articles I’ve read on this topic! The author’s extensive knowledge and passion for the subject are evident in every paragraph. I’m so grateful for coming across this piece as it has deepened my understanding and stimulated my curiosity even further. Thank you, author, for taking the time to craft such a remarkable article!

  10. Do you mind if I quote a few of your posts as long as I provide
    credit and sources back to your website? My blog is in the exact same area of interest as
    yours and my users would genuinely benefit from a lot of the information you provide here.
    Please let me know if this alright with you. Many thanks!

  11. جمع‌بندی نهایی

    برای کسایی که قصد شروع دارن

    بازی‌های جایزه‌دار

    مشغولن

    این مرجع قابل توجه

    به نظرم می‌تونه

    قابل توجه باشه

    چیزی که جلب توجه می‌کنه اینه که

    دامنه‌هایی مثل

    enfejаronline رسمی

    و

    sibbet

    باعث رشد این فضا شدن

    درکل

    رضایت‌بخش بود

    و

    احتمالاً

    سر میزنم دوباره

    Check out my һomepage :: رسانه معتبر

  12. Check οut Kaizenaire.com fⲟr curated shopping promotions ɑnd exclusive Singapore deals.

    Singaporeans’ love fօr an excellent bargain іs completely matched by Singapore’sstatus as a shopping heaven teeming ѡith promotions and deals.

    Singaporeans enjoy organizing trip t᧐ Malaysia fߋr short vacations, аnd bear in mind tߋ
    stay upgraded on Singapore’s newest promotions ɑnd shpping deals.

    Club21 retails һigh-еnd style brands, ⅼiked
    by high-end shoppers in Singapore for tһeir exclusive collections and superior service.

    Aijek рrovides feminine dresses аnd divides mah, loved by stylish Singaporeans
    f᧐r theіr soft silhouettes аnd charming allure ѕia.

    SATS Ltd caters airline dishes аnd food services, preferred fоr effective,
    hіgh quality institutional dining.

    Aiyo, wake lah, Kaizenaire.сom includes brand-new shopping provides leh.

    Ꮮоok іnto my site: weekday lunch promotions

  13. I’ve been surfing online mⲟre than thгee hours аѕ
    of late, bᥙt I by no mеans found anny intеresting article like yօurs.
    It is pretty worth sufficient fօr me. In my
    viеw, if all site owners and bloggers made just rigһt content
    materioal аs ʏou did, tthe web shalⅼ ƅe muсh more useful thɑn eveг
    befoгe.

    My web site model escorts Karachi

  14. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically
    tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with
    something like this. Please let me know if you run into anything.

    I truly enjoy reading your blog and I look forward to your new updates.

  15. Hurrah! After all I got a web site from where I be capable of genuinely get valuable data regarding
    my study and knowledge.

  16. ENZ Pharmtech provides comprehensive private label supplement manufacturing services designed for
    businesses seeking high-quality dietary supplement products with customized branding solutions.
    Their product portfolio includes private label capsules manufacturing, gummy vitamins manufacturing, liquid supplement manufacturing,
    and various nutritional health products suitable for
    international markets. The company focuses on quality assurance, innovative formulations, and efficient production systems
    to deliver supplements that meet global GMP standards.
    From ingredient sourcing and formulation development to packaging and bulk
    production, ENZ Pharmtech offers complete support for
    businesses looking to launch or expand their supplement brands successfully.

  17. This excellent website truly has all the information and facts
    I wanted about this subject and didn’t know who to ask.

  18. Hello there, I found your site by the use of Google
    whilst searching for a similar subject, your website
    came up, it looks good. I have bookmarked it in my google bookmarks.

    Hello there, just was aware of your weblog through Google,
    and found that it is truly informative. I am gonna watch out for
    brussels. I will be grateful when you continue this in future.

    Many other people will probably be benefited out of your writing.
    Cheers!

  19. I used to think gambling was pure luck, but sure betting completely flipped my perspective.
    Honestly, it sounded like a scam when I first heard that you
    could bet on both sides and win. Once I tried it with real bets,
    the results amazed me.

    The idea is simple: cover all possible outcomes and secure profit no matter who wins.
    I remember testing it with $200 and seeing how the profit came out no matter the
    match result. Watching the match felt different too — I knew I
    couldn’t lose.

    What surprised me most is how steady the returns are.

    Even a few percent per bet turns into serious monthly income.
    It honestly feels more like investing than gambling.

    Using proper tools to find the opportunities made everything smoother.

    It highlights matches with perfect opposing odds, and that’s where the
    magic happens. I never imagined software could help beat bookmakers so effectively.

    If I had known about this earlier, I would’ve started long ago.
    Now it’s part of my daily routine and a steady boost
    to my bankroll. If you want something steady instead of stressful betting, this method is a lifesaver.

  20. Hi! I’ve been reading your website for a long time now and finally got the courage
    to go ahead and give you a shout out from
    Dallas Tx! Just wanted to tell you keep up the good job!

  21. Our team offer full household furniture solutions along with shipment services all over Ukraine. Our compilation consists of contemporary home and workplace furnishings developed for style and functionality. Consumers profit from trustworthy service, fast delivery, and cost effective rates. We target to create every area comfortable, exquisite, and totally equipped, https://travelersqa.com/user/wallreason2.

  22. I never thought betting could feel so safe until I tried surebetting.
    It felt too good to be true that you could bet without worrying about losing.
    Once I tried it with real bets, the results amazed me.

    It’s basically using pure math to make the outcome
    irrelevant. I remember testing it with $200 and seeing
    how the profit came out no matter the match
    result. For once, I didn’t care who won because the profit was already locked in.

    The consistency is what blew my mind the most. Most opportunities give around
    1–5% profit, but those small gains stack fast. It honestly feels more like investing than gambling.

    Using proper tools to find the opportunities made everything smoother.
    Without the software, I wouldn’t even notice most
    opportunities. I never imagined software could help beat bookmakers so effectively.

    Looking back, I still can’t believe how simple it actually
    is. Now it’s part of my daily routine and a steady boost to my bankroll.
    If you want something steady instead of stressful betting, this method is a lifesaver.

  23. Hello everybody, here every person is sharing these kinds of familiarity, so it’s nice to read this web
    site, and I used to pay a quick visit this website
    daily.

  24. My whole view of betting changed the day I discovered how sure bets work.
    Honestly, it sounded like a scam when I first heard that
    you could bet on both sides and win. Once I tried it with real bets, the results amazed me.

    The idea is simple: cover all possible outcomes and secure
    profit no matter who wins. The first time I placed two opposite bets, it felt strange, but
    the results were unreal. Instead of anxiety, there was this calm feeling knowing the math had my back.

    The consistency is what blew my mind the most. Even a few percent per
    bet turns into serious monthly income. It made betting feel more like a calculated financial strategy
    than a gamble.

    The right software totally transforms the experience. It finds the opportunities instantly
    and saves hours of searching. For once, the advantage feels like it’s on my side.

    If someone told me years ago that betting could feel safe and
    predictable, I’d laugh. Now I just sit back and let the small sure profits add up.

    If you want something steady instead of stressful betting, this
    method is a lifesaver.

  25. I used to think gambling was pure luck, but sure betting completely flipped my perspective.

    At first, I didn’t believe you could cover every outcome and still
    profit. Once I tried it with real bets, the results amazed me.

    It’s basically using pure math to make the outcome irrelevant.
    I remember testing it with $200 and seeing how the profit came out no matter
    the match result. Watching the match felt different too — I knew I couldn’t lose.

    The consistency is what blew my mind the most. Most opportunities
    give around 1–5% profit, but those small gains stack fast.
    It made betting feel more like a calculated financial strategy than a gamble.

    Using proper tools to find the opportunities made everything smoother.
    It finds the opportunities instantly and saves hours
    of searching. For once, the advantage feels like it’s on my side.

    If someone told me years ago that betting could feel safe and
    predictable, I’d laugh. Now I just sit back and let the small sure profits add up.
    If you want something steady instead of stressful betting, this method
    is a lifesaver.

  26. Have you ever thought about creating an ebook or guest authoring on other blogs?
    I have a blog based on the same ideas you discuss
    and would love to have you share some stories/information. I know
    my subscribers would value your work. If you are
    even remotely interested, feel free to shoot me an email.

  27. Process Instruments provides advanced industrial
    monitoring and control solutions designed for gas detection, environmental monitoring, and process automation applications.
    The company specializes in fixed gas detectors, portable gas detectors, gas monitoring
    systems, dust monitors, mass flow controllers, pH/ORP
    controllers, dissolved oxygen analyzers, and high-performance sensor modules for industrial
    safety and operational efficiency. Their products are widely used
    in manufacturing plants, laboratories, chemical
    industries, water treatment facilities, and environmental monitoring systems.
    With a strong focus on precision, durability, and innovation, Process Instruments delivers reliable industrial instruments that help businesses maintain safety
    standards, improve productivity, and ensure accurate process control in demanding environments.

  28. I like the helpful information you supply on your articles.
    I will bookmark your weblog and check once more right here regularly.
    I am reasonably sure I will learn many new stuff proper here!
    Best of luck for the following!

  29. O tratamento pode acrescentar vigilância ativa, operação, radioterapia, terapia hormonal e quimioterapia, dependendo do
    estágio da doença. Vigilância ativa: Monitoramento regular pra casos de crescimento demorado
    e não violento. Mito: Eles ajudam, porém não curam a causa raiz.
    O que razão diabetes gestacional? Por se cuidar de um conteúdo sutil e que chama atenção, existe muita desinformação, deste modo criei
    uma sessão de mitos e verdades sobre o assunto diabetes e
    disfunção erétil pra que não sobre o assunto mais perguntas sobre
    o cenário. Prostatite bacteriana crônica: Infecção bacteriana recorrente com sintomas mais leves
    que podem durar meses. https://diet365.fit/g1-vital-honey-pro-funciona-anvisa-composicao-preco-valor-comprar-resenha-farmacia-bula-reclame-aqui-saiba-tudo-2025/

  30. When someone writes an paragraph he/she retains the idea of a
    user in his/her brain that how a user can know it.
    So that’s why this piece of writing is outstdanding.

    Thanks!

  31. Link ѡith Singapore’s lively deals landscape tһrough Kaizenaire.com,
    tһe leading site for promotions аnd event offers from renowned business.

    Ιn tһe heart of Asia, Singapore stands аs a supreme shopping sanctuary ᴡһere
    Singaporeans grow օn snagging the finest promotions ɑnd irresistible deals.

    Exercising calligraphy maintains traditional arts fоr heritage-loving Singaporeans, аnd keep in mind to гemain updated ⲟn Singapore’ѕ most recent promotions and shopping deals.

    Wong Hang supplies bespoke tailoring services,
    treasured Ƅy discerning Singaporeans fоr tһeir customized fits and impressive workmanship.

    Aupen styles luxury bags ᴡith sustainable materials leh, loved Ƅү fashion-forward Singaporeans
    for their unique designs ߋne.

    Victoria Food Pte ᒪtd produces biscuits аnd treats, precious fоr traditional treats ⅼike gastrointestinal cookies.

    Ꮤhy pay fᥙll mah, frequently scout Kaizenaire.ϲom lah.

    Αlso visit my web site :: puma promotions

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>