Play Form – Binding Data
Play Framework follows a concept called Binding Data to handle Forms and their submissions.
Here, Binding Data means mapping or binding data between Play Form Data (user filled and submitted data using the HTTP POST request) and user-defined (or application) case class object, as shown in the next diagram.
When the user fills the Form data and submits it, Play Framework's Form object receives that data from the user (user interface - UI).
Play Framework's Form object binds that data to user-defined data (in Scala terminology, it is also known as applying data).
This means, here we use the user-defined case class's apply() function to bind data from the Form to the case class object.
Next, when the users or applications ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access