Play 2.2 Scala: Default values for a simple form -
Currently, I have a simple form that In my scala.html file: I want a form to submit the existing values of e-mail, password, phone, if the user does not edit it. How do I do that? You can pass the default value such as forms [(string, string, string)]
@form (routes.Application.editParticipant (pid)) {@inputText (pForm ("email"), '_ label - & gt; "email", '_show constants -> wrong, placeholder - & gt; email) @ input text (pForm ("password"),' _log - & gt; "password", '_showConstraints - & gt; wrong, 'placeholder - & gt; password) @ input text (pForm ("phone"),' _log - & gt; "phone number", '_show contracts - & gt; wrong, page Lesholder - & gt; call) & lt; Input type = "submit" value = "edit" & gt; }
@inputtext (pForm ("email"). Copy (value = some ("abc@def.com"), '_ labels - & gt; "email",' _showConstraints - & gt; wrong, placeholder - & gt; email )
Comments
Post a Comment