This past week I started working with the Play Framework (version 2.6), and this is a quick look at how to implement user authentication in a Play application. Specifically this blog post focuses on how to create a custom action so you can secure your Play controllers methods, where you’ll implement those methods using this new, custom action.
If you ever need to include multiple Play Framework 2.6 validators for a template form field, the
uri field below shows the syntax that worked for me:
If you want to see an example of a Play Framework 2.6 data entry form that that sets help text (tips or tooltips) on text input fields (Play inputText fields), here’s an example of the required syntax:
As a brief note to self before I delete this code, this is how you create a drop-down list in Play Framework 2.6:
@* adding 'size to helper.select creates a select/option area (single or multi-select) *@ @helper.select( form("category"), categories, 'id -> "category", '_help -> "Select one, any one" )
In that code, categories is passed into the Play template like this: