Play 2.2 Scala: Default values for a simple form -


Currently, I have a simple form that forms [(string, string, string)]

In my scala.html file:

  @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; }   

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

  @inputtext (pForm ("email"). Copy (value = some ("abc@def.com"), '_ labels - & gt; "email",' _showConstraints - & gt; wrong, placeholder - & gt; email )    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -