Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fill the original empty template with nested-repeat element
json code's spelling mistake
- Loading branch information
Showing
3 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 18 additions & 1 deletion
19
...king/scalaGuide/main/forms/code/scalaguide/forms/scalaforms/views/contact/form.scala.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
@(contactForm: Form[Contact]) | ||
@(contactForm: Form[Contact])(implicit messages: Messages) | ||
|
||
@import scalaguide.forms.scalaforms.controllers.routes | ||
|
||
@helper.form(action = routes.Application.saveContact) { | ||
|
||
@helper.inputText(contactForm("firstname")) | ||
@helper.inputText(contactForm("lastname")) | ||
@helper.inputText(contactForm("company")) | ||
|
||
@helper.repeat(contactForm("informations")) { info => | ||
@helper.inputText(info("label")) | ||
@helper.inputText(info("email")) | ||
@helper.repeat(info("phones")) { phone => | ||
@helper.inputText(phone) | ||
} | ||
} | ||
|
||
<input type="submit" id="submit" value="@routes.Application.saveContact"> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters