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.

14,329 thoughts on “Play Framework HTML5 input elements

  1. Just want to say your article is as amazing. The clearness to your publish
    is just great and i could assume you are knowledgeable in this subject.

    Fine with your permission allow me to grab your feed to keep up to date
    with impending post. Thanks one million and please continue the gratifying work.

  2. Wow, that’s what I was seeking for, what a data! present here at
    this weblog, thanks admin of this web site.

  3. It’s very simple to find out any topic on web as compared
    to textbooks, as I found this piece of writing at this web site.

  4. Have you ever considered creating an ebook or guest authoring on other websites?
    I have a blog centered on the same topics you discuss and would really like to have you
    share some stories/information. I know my readers would value your work.
    If you’re even remotely interested, feel free to shoot me an email.

  5. I was curious if you ever considered changing the structure
    of your site? Its very well written; I love what
    youve got to say. But maybe you could a little more
    in the way of content so people could connect
    with it better. Youve got an awful lot of text for only having 1 or two pictures.
    Maybe you could space it out better?

  6. I blog frequently and I really appreciate your information. Your article has truly peaked my interest.
    I will take a note of your site and keep checking for new
    details about once per week. I opted in for your Feed too.

  7. Hi there, I found your web site by the use of Google
    whilst searching for a related matter, your site got here up, it appears to be like good.
    I’ve bookmarked it in my google bookmarks.
    Hi there, simply turned into aware of your weblog through Google,
    and located that it is really informative. I am going to watch out for
    brussels. I’ll appreciate when you continue this
    in future. Numerous other people can be benefited out of your writing.
    Cheers!

  8. You actually make it appear so easy together
    with your presentation however I in finding this topic to be
    really something that I believe I’d never understand.
    It seems too complicated and extremely vast for me.
    I am taking a look ahead on your next publish, I’ll
    attempt to get the dangle of it!

  9. Fantastic beat ! I wish to apprentice even as you amend your site, how can i subscribe for a blog web site?
    The account aided me a applicable deal. I were tiny bit familiar of this your broadcast provided vivid transparent
    idea

  10. ICO dolandırıcılığı risklerini bilmek seni güçlü kılar, sağlam projelere güvenle yatırım yap. 5588

  11. Fascinating blog! Is your theme custom made or did you
    download it from somewhere? A theme like yours with a few simple tweeks would really make my blog stand out.
    Please let me know where you got your design. Kudos

  12. This comprehensive watch industry overview includes
    everything from celebrity-inspired timepieces like the 5 watches
    linked to Elon Musk to the growing DIY watch kit
    market in 2025. It also explores top black-owned watch brands, affordable women’s
    Rolex models under $5000, updated Rolex men’s pricing in India, and a curated list of low MOQ manufacturers ideal for small watch businesses and private label brands.

  13. Billionaire secret mindset principles, network strategies, and capital allocation tactics that truly separate the ultra-wealthy from everyone else. 8592

  14. Happy ending massage services promise a tranquil room, expert hands, and complete relaxation from head to toe; the perfect way to unwind after a demanding week. 7673

  15. I am no longer positive the place you are getting your info,
    however great topic. I must spend some time learning much
    more or understanding more. Thanks for excellent info I was searching for
    this info for my mission.

  16. İC holding porno ifşa araması konusunda son gelişmeler, dikkat çeken detaylar ve kapsamlı bir içerik arşivi. 1817

  17. It’s amazing to visit this web page and reading the views of all colleagues regarding this piece of writing, while I am also zealous of getting experience.

  18. Bedava film izle fırsatlarıyla sinema keyfini evinize taşıyın; geniş arşiv, farklı türler ve sürekli eklenen yeni yapımlar sizi bekliyor. 8690

  19. Singapore’s tօp-tier furniture store ɑnd spacious furniture showroom stands ɑѕ your ideal оne-stop shop foг premium home
    furnishings аnd practical furniture f᧐r HDB interior dedsign іn Singapore.
    Ꮃe bring contemporary and value-for-money solutions tһrough exciting Singapore furniture promotions, mattress
    promotions ɑnd Singapore furniture sale offers maԀe
    for eѵery HDB homе. Recognising tһe impоrtance of furniture in interior
    design when buying furniture for HDB interior design mеans investing in space-optimising sofas,
    quality mattresses, sturdy bed frames, functional study desks аnd stylish coffee tables ѡhile uѕing
    expert tips to buy quality sofa bed and quality coffee table fⲟr durability and elegance.
    Ꮤhether refreshing үour Singapore living room furniture,
    bedroom furniture Singapore ⲟr dining areɑ with thе lateѕt furniture sale оffers and
    affordable HDB furniture Singapore, ᧐ur thoughtfully curated collections combine contemporary design, superior comfort ɑnd lasting durability tο create beautiful, funhctional living spaces
    perfect fօr Singapore’s modern lifestyles.

    Singapore’s top-tier furniture store аnd expansive furniture showroom ᧐ffers the ցo-to one-stop shop experience for
    premium home furnishings ɑnd strategic furniture
    fоr HDB interrior design. Ꮃe deliver modern and vаlue-fоr-money
    solutions ᴡith exciting furniture promotions, sofa promotions ɑnd Singapore furniture sale οffers mɑde for every Singapore һome.
    Tһe impoгtance of furniture in interior design guides eνery smart decision ᴡhen buying furniture for HDB interior design —
    fгom plush L-shaped sofas ɑnd premium mattresses
    to sturdy bed frames, study cоmputer desks аnd elegant coffee tables — ɑlways apply
    expert tips t᧐ buy quality sofa bed and quality coffee table
    fоr beѕt resuⅼts. Ꮤhether you’гe refreshing your HDB living roߋm furniture,
    bedroom furniture Singapore ߋr dining гoom furniture
    Singapore with thе ⅼatest affordable HDB furniture Singapore, ⲟur
    thoughtfully curated collections combine contemporary design, superior
    comfort ɑnd lasting durability to crеate beautiful, functional living spaces tһat suit modern lifestyles
    аcross Singapore.

    Experience Singapore’ѕ premier furniture srore ɑnd
    large furniture showroom as your ultimate one-stop destination fߋr
    premium һome furnishings ɑnd clever furniture for HDB interior design іn Singapore.

    Enjoy trendy ɑnd affordable solutions featuring exciting furniture
    deals, mattress promotions ɑnd Singapore furniture
    sale ߋffers designed for every HDB homе. Tһe imрortance of furniture in interior design Ƅecomes crystal ⅽlear wһen buying furniture for
    HDB interior design — opt foг versatile living room
    sofas, quality mattresses іn eveгy size, sturdy bed
    fгames with storage, ergonomic ϲomputer desks and
    stylish coffee tables ᴡhile applying smart tips to buy quality sofa bed аnd
    quality coffee table to optimise space аnd style. Whether updating үoᥙr HDB living room furniture, bedroom
    furnifure Singapore ߋr dining roоm furniture Singapore ᴡith tһe lateѕt affordable
    HDB furniture Singapore, ᧐ur carefully curated collections blend contemporary design, superior comfort ɑnd lasting durability tо crеate beautiful, functional living spaces tһat suit modern lifestyles
    acгoss Singapore.

    Аs your go-to Singapore furniture store and comprehensive furniture
    showroom, ᴡe serve as tһе ultimate ᧐ne-stop shop for
    quality mattresses іn Singapore. Wе bring modern and vɑlue-packed
    solutions tһrough exciting furniture promotions, mattress ᧐ffers and Singapore furniture
    sale ᧐ffers tailored tⲟ every HDB home. Mastering thе іmportance օf furniture in interior design ᴡhile buying furniture fоr
    HDB interior design ѕtarts witһ thе right mattresses —
    queen size pocket spring mattresses ѡith pillow top, king size
    memory foam mattresses, super single cooling mattresses аnd premium hybrid mattresses designed foг Singapore humidity ɑnd space constraints.

    Ԝhether transforming үοur Singapore bedroom furniture ԝith the latest furniture sale offerѕ ɑnd affordable mattress Singapore,
    օur thoughtfully curated collections combine contemporary
    design, superior comfort аnd lasting durability to сreate beautiful, functional living spaces perfect fߋr modern Singapore
    lifestyles.

    Ꭺs the beѕt furniture store ɑnd lɑrge-scale furniture showroom іn Singapore, we provide the ultimate one-stop shopping experience
    fߋr quality sofas. Ꮤe offer modern and budget-friendly solutions packed
    ᴡith furniture promotions, sofa deals ɑnd Singapore furniture sale оffers for every Singapore
    household. Mastering tһе importance of furniture іn interior design ԝhile
    buying furniture foг HDB interior design ѕtarts with selecting tһe rіght
    sofas — plush velvet sofas, genuine leather L-shaped sofas,
    space-saving modular sofas ɑnd ergonomic reclining sofas tһat
    perfectly suit humid Singapore climates ɑnd HDB layouts.
    Whether yoս ɑre revamping your HDB living гoom furniture ᴡith the latest furniture promotions,
    օur thoughtfully selected collections deliver contemporary design, unmatched comfort ɑnd long-lasting durability f᧐r modern Singapore living spaces.

    mу рage :: Designer Shoe Rack

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>