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.

15,214 thoughts on “Play Framework HTML5 input elements

  1. Nice post. I learn something new and challenging on websites
    I stumbleupon every day. It will always be exciting to read through content from other authors and practice something from other sites.

  2. Wow, fantastic weblog structure! How long have you been blogging for?

    you make running a blog glance easy. The total look of your web site is wonderful, let alone the content!

  3. Жильё в Турции обозначаются формулой «спальни плюс гостиная»:
    3+1 — три спальни и общая зона.

    Средний метраж 1+1 — 45–65 м².

    Цены в 2026 году варьируются от 1
    200 € в Алании. Самые доступные — Мерсин и
    Трабзон. Топ-локации — центральный
    Стамбул.

    Поиск объектов: купить квартиру за границей.
    Все варианты с полной документацией —
    в любом бюджете.

  4. I don’t even know how I ended up here, but I thought this post was great.
    I don’t know who you are but certainly you’re going to a famous blogger if
    you are not already ;) Cheers!

  5. This is a helpful post about online casinos. I appreciate
    how you explained the importance of choosing reliable sites.

    From what I’ve seen, ufabet888 are often recommended
    because they provide consistent service and fast withdrawals.

    Many users have trouble to find trustworthy platforms, so content like this
    is very helpful.

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

  6. This is a very informative post about online
    casinos and betting platforms. I especially liked how it explains the importance of choosing
    a trusted site before registering.

    Many players often ask where to find reliable gaming platforms with fair odds and smooth withdrawals.
    In my experience, checking platforms like milyon88games.com
    helps users understand what features to look for in a legit online casino.

    Thanks for sharing these insights — they’re useful for both beginners and experienced players.

  7. I was reading an interesting article about Paybis and honestly I didn’t
    expect much at first but it impressed me.
    The article talked about how digital finance is evolving, and it actually made sense.

    After reading it, I recommended it to my family member, and he decided
    to explore it. Within the next month, he started managing his money differently.

    He didn’t just sit around — he took action. Eventually,
    he got close to 150k in results — not overnight, but
    through consistency.
    What surprised me most is how his lifestyle
    changed. He even upgraded his lifestyle,
    something like a Mercedes-Benz C-Class, and became more confident.

    He even met someone new who shares his lifestyle.
    This isn’t magic or guaranteed, but the story is true from what
    I’ve seen, and that article definitely changed the way we look at money.

    There’s actually a way to check it out here, and I’d seriously suggest reading it.

    Sometimes one good article can shift your mindset.

  8. Hi! I just wanted to ask if you ever have any trouble with
    hackers? My last blog (wordpress) was hacked and I ended up losing many months of
    hard work due to no data backup. Do you have any methods
    to protect against hackers?

  9. Nice weblog right here! Also your site so much up fast!
    What host are you the usage of? Can I am getting your affiliate link
    for your host? I desire my web site loaded up as fast as yours lol

  10. Primary-level math tuition іs vital for developing logical
    reasoning аnd pгoblem-solving abilities neеded to conquer the increasingly complex ԝorɗ probⅼems encountered in upper primary grades.

    Regular secondary math tuition equips students tto surmount recurring difficulties —
    ρarticularly tіme pressure іn problеm-solving,
    graph analysis, ɑnd multi-step logical reasoning.

    Ꭺ large proportion of JC students tսrn to math tuition to gain mastery ᧐veг and sharpen advanced strategies fοr tһe conceptually deep ɑnd proof-based questions tһat
    characterise H2 Math examination papers.

    Ιn Singapore’s fаst-paced and highly competitive
    education systеm, virtual mathematics tutoring һаs emerged aѕ
    a vital resource for primary students, offering adaptable lesson tіmes and personalised one-tо-one guidance to hеlp yߋung learners thοroughly understand foundational PSLE topics
    ⅼike fractions, ratios ɑnd speed-distance рroblems frօm һome wіthout rigid centre schedules.

    OMT’ѕ neighborhood forums permit peer ideas, wһere
    shared math understandings spark love аnd cumulative drive fоr exam excellence.

    Dive into self-paced mathematics mastery ѡith OMT’ѕ 12-month e-learning
    courses, сomplete ԝith practice worksheets ɑnd tape-recorded sessions fоr thorough revision.

    Offered that mathematics plays ɑ pivotal role іn Singapore’s economic advancement and development, buying specialized math tuition equips students
    ᴡith the analytical skills ndeded t᧐ prosper in a competitive landscape.

    Tuition emphasizes heuristic analytical methods, vital fоr dealing wіth PSLE’ѕ challenging word ρroblems tһat need numerous steps.

    Tuition assists secondary pupils establish examination аpproaches, ѕuch as time allocation fߋr bߋth Ο Level math documents, causing fɑr bеtter overаll performance.

    Eventually, jjunior college math tuition іs essential to securing tⲟp A
    Level гesults, opening up doors to distinguished scholarships ɑnd higher eduhcation possibilities.

    Ꭲhe proprietary OMT curriculum stands օut by incorporating MOE curriculum aspects ԝith gamified quizzes ɑnd difficulties to
    mаke finding out even moгe enjoyable.

    OMT’s syѕtem іs mobile-friendly օne, so study on tһe g᧐ and seе уour
    mathematics qualities improve ѡithout missing оut on a beat.

    By highlighting theoretical understanding οvеr rote learning, math tuition gears
    ᥙp Singapore pupils fߋr the developing test layouts.

    Μү homepaɡe singapore math tuition center

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>