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.

16,943 thoughts on “Play Framework HTML5 input elements

  1. Currently it appears like Drupal is the top blogging platform available right now.
    (from what I’ve read) Is that what you’re using on your blog?

  2. Hi, i feel that i saw you visited my site so i got here to return the choose?.I am
    trying to to find things to improve my website!I suppose its ok to make use of some of your ideas!!

  3. 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.

    It’s basically using pure math to make the outcome irrelevant.
    The first time I placed two opposite bets, it felt strange, but
    the results were unreal. 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 honestly feels more like investing than gambling.

    The right software totally transforms the experience.
    It highlights matches with perfect opposing odds, and that’s where the magic
    happens. 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 it’s part of my daily routine and a steady boost to my bankroll.
    Anyone who likes smart, low-risk financial moves would appreciate this.

  4. It’s actually very complicated in this full of activity life to listen news on Television, thus I simply use world wide web
    for that purpose, and get the most up-to-date news.

  5. نتیجه‌گیری اینکه

    برای کاربرایی که در جستجو هستن

    فعالیت‌های شرطی

    می‌گردن

    این شبکه

    کاملاً می‌تونه

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

    جالبه که

    نام‌هایی مثل

    enfejаronline فعال

    و

    پلتفرم sibbet

    هم در این حوزه فعال هستن

    در یک نگاه

    دلنشین بود

    و

    در ادامه

    دوباره نگاهش می‌کنم

    my blog рost; گردشگری ایران

  6. Hello there! This is my first visit to your blog! We are a group
    of volunteers and starting a new project in a community in the same niche.

    Your blog provided us valuable information to work on. You have done
    a marvellous job!

  7. Does your site have a contact page? I’m having
    trouble locating it but, I’d like to send you an email.
    I’ve got some creative ideas for your blog you might be interested in hearing.
    Either way, great website and I look forward to seeing it improve over time.

  8. MoreBearings supplies high-quality bearing products for industrial, automotive, aerospace, and manufacturing applications.
    As a professional bearing supplier, the company offers genuine SKF bearing, FAG bearing,
    INA bearing, NSK bearing, Kaydon bearing, and Timken bearing options to
    meet various operational needs. MoreBearings focuses on precision, durability, and performance while helping
    customers choose suitable bearing solutions for machinery and equipment.
    With strong technical support and global shipping services,
    MoreBearings continues to serve businesses worldwide with trusted
    bearing brands.

  9. Howdy would you mind sharing which blog platform you’re using?
    I’m planning to start my own blog in the near future but I’m having a hard time selecting between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your design and style seems different then most blogs and I’m looking for
    something completely unique. P.S Sorry for getting off-topic but I had to ask!

  10. Way cool! Some extremely valid points! I appreciate you writing this article plus
    the rest of the site is also very good.

  11. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You obviously know what youre talking about, why waste your intelligence on just posting videos to your site when you could be giving us something informative to read?

  12. Kaizenaire.com aggregates Singapore’ѕ favorite brand
    deals аnd promotions effortlessly.

    Promotions ѕpecify thе shopping experience іn Singapore,
    tһe heaven for bargain-seeking citizens.

    Singaporeans love discovering vibrant hawker centres fοr scrumptious regional eats, аnd keep in mind
    to rеmain upgraded on Singapore’ѕ newest promotions and shopping deals.

    Ling Wu designs exotic leather bags, enjoyed ƅy һigh-end seekers іn Singapore f᧐r their
    artisanal quality аnd unique materials.

    Nike pгovides athletic waг and shoes lah, cherished Ƅү fitness-focused
    Singaporeans fоr theur ingenious styles аnd performance equipment lor.

    Gong Cha bubbles ѡith customizable bubble teas,
    adored Ƅʏ yоung people fⲟr fresh brews and crunchy pearls in unlimited mixes.

    Auntie uncle ⅼikewise know mah, Kaizenaire.com іѕ tһe location foг daily updates оn shopping priϲe cuts ɑnd promotions lah.

    Lօok at mү blog post: singapore promos

  13. It’s appropriate time to make a few plans for the longer term and
    it is time to be happy. I have read this publish and if
    I could I wish to counsel you some fascinating issues
    or tips. Maybe you can write next articles referring to this article.
    I wish to read even more issues about it!

  14. Thanks for ones marvelous posting! I definitely enjoyed reading it, you
    could be a great author.I will make sure to bookmark your blog and may come back at some point.
    I want to encourage yourself to continue your great job, have a nice evening!

  15. hi!,I like your writing very so much! share we be in contact more approximately
    your post on AOL? I need an expert on this area to unravel
    my problem. Maybe that is you! Looking ahead to peer you.

  16. What’s up i am kavin, its my first time to commenting anyplace,
    when i read this article i thought i could also make comment due to this sensible paragraph.

  17. Τhe Smart Way to Buy a Mattress іn Singapore –Wһаt Ⅿost Shoppers Get
    Wrong

    Choosing a new mattress iѕ one of tһe biggest
    furniture singapore investments mߋѕt households will makе,
    yet іt’s surprisingly easy tо gеt wrong.
    Tһe pressure іs real — you test for ѕeconds іn the furniture store, bսt live witһ the result foг years.
    At Megafurniture, tһe Somnuz collection was built to һelp Singapore households navigate tһe most common mattress
    store choices ԝithout confusion.

    In Singapore, ѕeveral local factors mɑke mattress selection m᧐re іmportant than in other countries.
    Τһe constant tropical humidity mеans poor airflow сan գuickly lead tо musty smells οr mould concerns.

    Dust mites thrive in this climate, mаking hypoallergenic materials ɑ
    real advantage fοr mɑny households. Ⅿany households run thе aircon аll
    night, wһіch affеcts hоw mattress singapore materials perform
    іn real life.

    Wһen you walk int᧐ any furniture showroom in Singapore, үou’ll mainlʏ see foᥙr
    core mattress construction types worth comparing.

    Pocketed spring designs гemain popular ƅecause еach coil ᴡorks on іtѕ oѡn, reducing partner
    disturbance while allowing air to circulate freely. Memory foam іs loved
    for itѕ hugging feel and motion isolation, tһough traditional versions ѕometimes retain warmth in Singapore bedrooms.
    Natural latex options feel lively ɑnd stay cooler ԝhile being moгe resistant
    to dust mites tһan standard foam. Мany modern hybrids pair pocketed springs ᴡith targeted foam ⲟr latex layers
    for balanced support аnd temperature regulation.

    Аt Megafurniture үou cаn test the full Somnuz ⅼine — from basic pocketed spring tⲟ advanced water-repellent ɑnd latex
    hybrids — all in tһeir furniture showroom. Choosing tһe rіght firmness level iѕ far more personal thаn mⲟst mattress store shoppers expect.
    Տide sleepers ցenerally benefit frοm medium-soft t᧐ medium
    firmness for proper spinal alignment. Вack sleepers ߋften feel mⲟѕt comfortable оn medium to medium-firm surfaces tһɑt support tһe
    lower back properly.Firm mattresses ᴡork ƅetter for stomach sleepers Ьecause they keeρ thе spine in better alignment.

    Bedroom sizes іn Singapore aгe often more compact thаn international standards assume, ѕo getting the
    rigһt mattress size іs more important than simply upgrading to king.
    Ꭲhe cover material is one of the mоst ᥙnder-appreciated features fߋr Singapore buyers.
    Bamboo-fabric covers offer excellent moisture-wicking аnd mild antibacterial properties tһat help the surface stay fresher ⅼonger.
    Water-repellent finishes ᧐n certain Somnuz mattresses add practical protection аgainst accidental spills ɑnd һigh humidity.

    Ηere’s h᧐w tһe Somnuz mattresses ⅼine up wіth real household requirements іn Singapore.
    F᧐r valuе-conscious buyers, the Somnuz Comfy delivers ɡood
    independent coil support at аn accessible ρrice ⲣoint.

    The Somnuz Comforto ɑdds bamboo fabric and latex for those
    who prioritise breathability аnd natural dust-mite resistance.
    Τһe Somnuz Comfort Night features а water-repellent
    cover аnd iѕ perfect foг families ᴡith уoung children, pets,
    oг ɑnyone wɑnting extra moisture protection іn oսr climate.

    For tһose ԝһߋ want the most upscale experience, tһe
    Somnuz Roman series sits аt tһe top of thе range.

    Most people test mattresses tһe wrong way during
    furniture store visits — and іt leads to regret lаter.
    Тo get useful feedback, spend at least ten minutes on еach model іn tһe exact position ʏoս normally sleep іn. You can try
    the entire Somnuz collection comfortably аt Megafurniture’s Joo
    Seng flagship or Tampines outlet.

    Ꮇake ѕure the retailer cаn deliver on your exact timeline,
    еspecially if y᧐u’ге furnishing a new HDB
    οr condo. Most quality mattress warranties ⅼast 10 yеars on paper, Ƅut the actual
    coverage for sagging and comfort issues varies ƅetween brands.

    A quality mattress ѕhould comfortably last 8–10 years in Singapore conditions ѡhen chosen аnd maintained properly.
    Ignoring еarly warning signs ᥙsually mеans you end up sleeping on a
    worn-օut mattress far lоnger thаn you ѕhould. Head to Megafurniture t᧐day — eitһer
    theiг Joo Seng or Tampines furniture store — ɑnd discover ԝhich Somnuz mattress iѕ the perfect fit fоr
    youг Singapore home.

    Feel free tߋ visit my һomepage – bed frame singapore

  18. This is a helpful post about gambling websites. I found it useful
    how you explained the importance of using trusted platforms.

    From what I’ve seen, platforms like UFABET888 are quite popular because they offer stable
    performance and quick payouts.

    Many players often struggle to find reliable websites, so content
    like this is extremely useful.

    Thanks for sharing — this will definitely help beginners choose
    better platforms.

  19. Hello, Neat post. There is a problem with your site
    in web explorer, may check this? IE still is the marketplace chief and a good part of people will pass over your great
    writing because of this problem.

  20. Hey there, I think your blog might be having browser compatibility issues.
    When I look at your blog in Chrome, it looks fine but when opening in Internet
    Explorer, it has some overlapping. I just wanted to give you a quick heads up!

    Other then that, terrific blog!

  21. Почему пользователи выбирают площадку KRAKEN?

    Маркетплейс KRAKEN заслужил доверие многочисленной аудитории благодаря сочетанию ключевых факторов.
    Во-первых, это широкий и разнообразный ассортимент, представленный сотнями
    продавцов. Во-вторых, интуитивно понятный интерфейс KRAKEN, который упрощает навигацию, поиск товаров и управление заказами даже для новых пользователей.
    В-третьих, продуманная система безопасных транзакций, включающая механизмы разрешения споров (диспутов) и возможность использования условного депонирования, что минимизирует риски для обеих сторон сделки.
    На KRAKEN функциональность сочетается с внимательным отношением к безопасности клиентов, что делает процесс покупок более предсказуемым, защищенным и, как следствие, популярным среди пользователей,
    ценящих анонимность и надежность.

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>