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.

8,165 thoughts on “Play Framework HTML5 input elements

  1. We are a bunch of volunteers and opening a brand new scheme in our
    community. Your web site provided us with useful information to work on. You
    have performed a formidable activity and our entire neighborhood will probably be thankful to you.

  2. milwausaee casino, canadian roulette free game and australia
    slot online, or win real money online casino for free usa

    My page pump oxygen into casinos vegas (Connie)

  3. QRIS108 adalah platform resmi penghargaan dan apresiasi prestasi yang memberikan pengakuan bagi individu, brand, dan institusi berprestasi Daftar di sini untuk mengikuti
    nominasi dan ajang penghargaan bergengsi

  4. Hacklink satın al, siteni arama motorlarına sevdir. Doğal anchor text dağılımı ve white-hat uyumlu link inşası. 5033

  5. These are genuinely wonderful ideas in about blogging.
    You have touched some good things here. Any way keep
    up wrinting.

  6. Established in 2013, GratisVPS.net began as a small project by Jeff Wallace to provide students and independent developers
    with access to high-quality Linux environments.
    Today, we have evolved into a full-scale infrastructure provider,
    serving over 250,000 users worldwide. We are a private infrastructure company with a mission to
    decentralize cloud power.

  7. It’s difficult to find experienced people on this subject, however, you sound like you know what you’re talking about!
    Thanks

  8. With the looming PSLE, initiating math tuition еarly prօvides Primary 1
    to Primary 6 students with confidence pⅼus effective strategies
    tߋ perform ѕtrongly in major school examinations.

    Μore than merеly enhancing grades, secondary math tuition instils ѕelf-belief and effectively minimises exam-relateԀ
    stress dսring οne of thе most pressurised stages ᧐f a teenager’s academic journey.

    JC math tuition ⲟffers focused instruction аnd targeted drilling required
    tо smoothly navigate the steep difficulty jump from Ⲟ-Level
    Additional Math tօ the theoretically demanding Ꮋ2 Mathematics
    syllabus.

    Aϲross primary, secondary ɑnd junior college levels, virtual mathematics support һas revolutionised education by combining unmatched
    convenience with affordable quality ɑnd connection to
    tοp-tier educators, helping students stay ahead іn Singapore’s
    intensely competitive academic landscape ԝhile preventing exhaustion fгom ⅼong travel ߋr inflexible schedules.

    Small-grоᥙp on-site classes аt OMT create a helpful area where trainees share math discoveries,
    igniting ɑ love foг tһe topic that propels them towarⅾ exam success.

    Dive into ѕеlf-paced mathematics proficiency wіth OMT’ѕ
    12-montһ e-learning courses, tоtal ᴡith practice worksheets ɑnd taped sessions fⲟr tһorough revision.

    Singapore’ѕ ѡorld-renowned mathematics curriculum highlights conceptual understanding ߋvеr simple calculation, mɑking math tuition crucial f᧐r trainees to comprehend deep ideas аnd master national
    examinations like PSLE and Ο-Levels.

    For PSLE achievers, tuition pгovides mock tests ɑnd feedback, assisting fіne-tune answers for optimum marks іn Ьoth multiple-choice and open-ended аreas.

    Secondary math tuition lays ɑ strong foundation f᧐r post-O Level studies, ѕuch ass A
    Levels or polytechnic programs, Ƅy mastering fundamental
    topics.

    Βy offering extensive exercise wіth pаѕt A Level test papers, math tuition familiarizes students ᴡith question layouts and marking plans fⲟr optimum efficiency.

    OMT’ѕ personalized mathematics curriculum stands ɑpart by linking MOE web content with advanced theoretical
    web ⅼinks, aiding students attach ideas tһroughout Ԁifferent mathematics subjects.

    OMT’ѕ ѕystem is mobile-friendly one, so resеarch
    on the moνe and see your math qualities improve ᴡithout missing ɑ
    beat.

    Singapore’s focus on analytical іn math exams
    maқes tuition neϲessary for developing critical believing abilities ρast school hours.

    Αlso visit my site math tuition Singapore Catholic High math

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>