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,389 thoughts on “Play Framework HTML5 input elements

  1. I’m curious to find out what blog system you’re using?

    I’m having some minor security problems with my latest site
    and I’d like to find something more secure. Do you have
    any recommendations?

  2. Howdy, i read your blog occasionally and i own a similar one and i was just wondering if you get a lot of spam remarks?

    If so how do you reduce it, any plugin or anything you can suggest?
    I get so much lately it’s driving me crazy so any assistance is very much appreciated.

  3. Hello there! Do you know if they make any plugins to protect against hackers?
    I’m kinda paranoid about losing everything I’ve worked
    hard on. Any recommendations?

  4. Daha fazlasını yazın, söyleyeceklerim bu kadar. Düz
    bir şekilde, sanki konuyu aktarmak için videoya güvendiniz gibi
    görünüyor. Açıkça ne hakkında konuştuğunuzu biliyorsunuz,
    peki neden videolar yayınlayarak zekanızı boşa
    harcıyorsunuz ki bize bilgilendirici bir şeyler verebilecekken?

  5. سلام، خودم اخیرا اتفاقی در اینترنت
    به این صفحه پیداش کردم و صادقانه برام جالب بود.

    محتواش جذاب بود و به ندرت همچین سایتی ببینم.
    احساس می‌کنم برای خیلی‌ها ارزش دیدن داره.
    اگر به دنبال منبع معتبر هستن حتما سر بزنن.

    در مجموع تجربه خوبی بود و قطعا
    بازدیدش می‌کنم

    در کل داستان

    برای دوست‌داران

    بازی انفجار آنلاین

    در حال بررسی هستن

    این سایت

    مطمئناً می‌تونه

    انتخاب قابل قبولی باشه

    در ضمن

    وبسایت‌هایی مثل

    enfeјaronline جدید

    و

    sibbet محبوب

    کاربرای زیادی دارن

    در پایان کار

    تجربه مثبتی داشتم

    و

    به احتمال زیاد

    بازم میام

    .

    Herre iss my web-site; تجربه بازی
    انفجار در یک سایت معتبر (Shelley)

  6. We are a group of volunteers and opening a new scheme in our community.
    Your web site provided us with valuable info to work on. You have done an impressive job
    and our entire community will be thankful to you.

  7. Kyle’s Football Cards is a trusted online store for authentic sports jerseys and collectibles, featuring NFL, NBA, MLB, NHL, and NCAA gear
    from top brands like Nike and adidas. Shop rare and
    hard-to-find jerseys with fast shipping and reliable service.
    Whether you’re a fan or collector, find premium jerseys at competitive prices.
    Use code KYLEFAN30 to get 30% OFF sports jerseys today.

  8. What i don’t understood is in fact how you are now not actually much more well-liked
    than you might be right now. You are so intelligent.
    You already know thus significantly in terms of this subject, produced me personally consider it from so many numerous angles.
    Its like men and women are not interested unless it’s one thing to accomplish with Girl gaga!
    Your own stuffs nice. All the time deal with it up!

  9. Simply want to say your article is as surprising.
    The clarity for your post is simply spectacular and that i can suppose you’re an expert
    on this subject. Well with your permission allow me to clutch your feed to stay up
    to date with drawing close post. Thanks a million and please continue the gratifying
    work.

  10. Very rapidly this web site will be famous among all blogging
    and site-building viewers, due to it’s pleasant posts

  11. I’ll never forget the moment I stumbled onto this new gaming platform that had an atmosphere that
    pulled me in emotionally.
    Honestly, I was skeptical, but the crazy number of titles
    — over ten thousand options — hooked me.

    The starting bonus genuinely boosted my balance, and as soon as I activated it, I finally understood why people talk about good bonuses.

    Yes, the wagering wasn’t tiny, but I managed to handle it with patience.

    What really caught me emotionally was how the cashout didn’t leave me waiting for
    days.
    Within 24–72 hours, the money hit my account, and that moment felt reassuring.

    The VIP program was another unexpected thing.
    I never cared much for VIP stuff, but the gradual rewards actually felt meaningful.

    Getting back regular cashback packages felt like someone handing me
    a second chance, and I kept playing more confidently.

    The game variety overwhelmed me at first — in a good way.

    Classic table games, fast-paced slots, live dealers, jackpots —
    everything was there.
    Sometimes I’d switch from roulette to video slots, and the platform always had something fresh.

    What also surprised me was how many payment methods they supported.

    For me, waiting kills enthusiasm, so the instant deposits made everything run without friction.

    Of course, it wasn’t perfect.
    The VIP climb took time.
    And transparency wasn’t 100% ideal.
    But emotionally?
    The good outweighed the bad for me.

    If you’re reading this because you’re curious,
    trust me — I found real entertainment value here.
    And yes, there’s a link in the comment, so give it a look if you’re curious.

  12. CHAPTER ONE: INTRODUCTION
    1.1 Background of the Study
    There is a history of popular music that has been an evolving process
    with social, technological and political trends that influence the transformation of popular music (Peiris, 2024).

    The processes of modernisation and technological progression have shown the world that,
    in the early days, popular music was the youth of a civilisation clinging to
    native traditions as they interact with the influences of the outside
    world, including popular music and television shows.

    The exposure to the Western harmonic framework, the instrumentation of Western popular music, and
    the production techniques were identified as the characteristic features of popular music
    in terms of hybridity (Alawathukotuwa, 2018).

    In the Sri Lankan context, the development of the Sinhala popular music was
    mainly linked with the cultural changes after
    independence (Shafeen et al., 2024). A deliberate attempt had been made to build a national musical identity which
    soothed the indigenous practices and elements with those of the West.
    The initial forms of pioneers like Sunil Santha were part of creating a localised musical structure, and the introduction of orchestral
    and operatic music by Premasiri Khemadasa was a step to
    widening the structural and expressive limits of Sinhalese music
    (Kalinga Dona, 2019). Later, the transformative appearance of Clarence Wijewardena became an element that would shape the style of Sinhalese pop music by introducing Western instruments, rhythmic and production techniques
    in the area of the song, thus redefining the accessibility and popularity of the genre in the region where it is performed (Edirisooriya, 2023).

    In the 1990s, there was a drastic change in Sinhala popular music
    due to the liberalisation of the media and the erosion of a monopoly on popular culture and
    music held by the Sri Lanka Broadcasting Corporation (Kalinga Dona, 2019).
    This time helped expose the local production styles and audience tastes to global genres of music like rock, reggae and
    alternative music. Consequently, this gradually took over the genre as a
    mainstream of commercial forms of representation, into a more
    eclectic and experimental form of representation (Alawathukotuwa, 2018).

    In this constantly changing musical world,
    Nadeeka Guruge was a unique composer whose music did not follow the overruling commercial tendencies.

    This was reflected in the compositions that deliberately stressed guitar-dominated minimalism, unusual harmonic settings, and richly textured stories (Kalinga Dona, 2019).

    Based on the traditional method of Western classical music with the local musical traditions,
    the approach of Guruge was a break with the traditional structured form of
    pop music and led to the opening up of artistic possibilities in Sinhalese popular music.

    1.2 Research Context
    A wide-ranging commercialised model of production had come to
    dominate the modern Sinhalese popular music industry, with standardised forms of songs, repetitive harmonic progressions and market-oriented lyrical themes dominating
    the industry (Jähnichen, 2020). Since the 1990s, as observed by previous studies,
    the growth of mass-oriented compositions through formulaic
    means (including increased use of digital media channels, digital distribution outlets and the
    like) with the aim of mass appeal, rather than experimentation of artistic worth (Edirisooriya,
    2023).
    Although the Sinhalese pop music had a cultural meaning, there were already a limited number of academic works focusing on an in-depth musical and lyrical analysis
    in the Sri Lankan context (Peiris, 2024). The literature of the time was mostly on historical development, the effect of the media or the structure of industries, leaving the gap on the analytical approach on composers (Shafeen et al., 2024).

    In this context, the work of Nadeeka Guruge had been placed within a modern alternative movement, which was a response to mainstream conventions.
    His focus on minimalism, change of structure,
    and lyrical richness made his composition a topical
    topic to study, which helped to better characterise current patterns of
    Sinhalese music practices (Meddegoda, 2020).
    1.3 Problem Statement
    Nadeeka Guruge had been well established in the Sri Lankan music industry as an influential figure, having
    contributed as a composer, a guitarist and even as a songwriter in various
    fields of music (Kalinga Dona, 2019). The existing scholarly
    and media-based discourses had recognised his influence, but such cases had only existed
    insofar as the film music had been composed, not in the context of what exactly had been contributed towards Sinhalese pop music composition.
    This left an evident missing link in the scholarly literature since the vital elements
    of his pop music, including most prominently the use of guitars to create
    minimalism, the content of lyrics/poems, and even the composition itself, had not been subjected
    to a rigorous study (Kalinga Dona, 2019). Also, the literature on how
    originality and innovation operated in the modern Sinhalese popular music was limited due
    to the absence of academic works, which focused on the works of the composers (Peiris, 2024).

    Consequently, the unique musical as well as cultural
    value of the pop compositions of Guruge had been unexplored at a scholarly level.
    Hence, the gap in the literature, which is the lack of system-based
    analysis of originality and distinctiveness in the pop song compositions done
    by Nadeeka Guruge in the context of Sinhalese popular music,
    was to be managed in this study (Jähnichen, 2020).

    1.7 Significance of the Study
    This research added to the academic contribution in the studies of the Sri Lankan pop song
    compositions that had received very little academic attention, but had significant years of
    progression through different genres and subdivisions of this genre (Shafeen et al., 2024).
    The study was a contribution to the existing literature
    as it went beyond the historical and the industry angle of writing
    and music.
    In practical terms, this study offered useful ideas to
    the musicians, composers and educators by showing
    how originality could have been attained through the alternative
    compositional approaches like minimalism, harmonic variation, and depth of
    lyrics (Edirisooriya, 2023). It could also be used as a source of musical education and practice of creativity in modern environments.

    Culturally, the study supported the preservation and critical understanding of Sinhala popular music by documenting innovative artistic expressions (Weerakkody, 2022).
    The study formed the basis of subsequent research on identity, creativity and transformation in the musical context in Sri Lanka,
    which is currently undergoing some changes.

    1.8 Scope of the Study
    The current paper was dedicated to studying the five chosen pop song compositions by Nadeeka Guruge that reflect various
    stylistic stages of his career in the wider context of Sinhalese pop music
    in the 1990s to early 2000s. Three major dimensions included in the analysis package were musical structure, of which harmony, rhythm,
    and instrumentation are considered key aspects; lyrical content, which includes topics and patterns of language;
    and cultural interpretation (Tilakaratna & Weerakkody, 2025).

    The study has not mentioned an in-depth analysis of the whole discography of Guruge,
    audience reception research, or quantitative research on popularity.

    Also not included were film music composition pieces and more of
    a macro-level economics of the industry, to ensure a focused
    and in-depth qualitative study.
    1.9 Structure of the Report
    • Chapter One – Introduction: It has presented the background
    of the research, problem statement, objective, research questions, the significance and scope of the research study.

    • Chapter Two – Literature Review: The literature
    review will utilise existing scholarly literature,
    pertinent to the subject of Sinhala popular music, hybridity and originality of the composers of Sinhalese popular music.

    • Chapter Three – Methodology: Explained the qualitative research design, data sources, song
    selection, and analytical techniques used in the study.
    • Chapter Four – Findings and Discussion: Analysed musical, lyrical and cultural elements of the chosen songs
    and explained key findings.
    • Chapter Five – Conclusion and Recommendations: Summarised results, contributions made, implications and directions to take future studies.

  13. Today, I went to the beachfront with my kids. I found a
    sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.”
    She put the shell to her ear and screamed. There was a hermit crab inside and
    it pinched her ear. She never wants to go back!
    LoL I know this is totally off topic but I had to tell someone!

  14. After looking at a number of the blog posts on your site, I really like your technique
    of blogging. I saved it to my bookmark website list and will be checking back in the near future.
    Please visit my website too and let me know what you think.

  15. It is the best time to make some plans for the future and it’s time to be happy.
    I have read this post and if I could I wish to suggest you
    some interesting things or suggestions. Perhaps you could write
    next articles referring to this article. I wish to read more things about it!

  16. Wow, awesome blog layout! How lengthy have you ever been blogging for?
    you make blogging look easy. The whole look of your site is wonderful,
    let alone the content!

  17. Howdy, I do think your site might be having internet browser compatibility issues.
    When I look at your web site in Safari, it looks fine however
    when opening in Internet Explorer, it has some overlapping issues.
    I merely wanted to provide you with a quick heads up!
    Apart from that, wonderful website!

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>