Skip to content

Instantly share code, notes, and snippets.

@bartschuller
Created February 24, 2012 21:43
Show Gist options
  • Save bartschuller/1903958 to your computer and use it in GitHub Desktop.
Save bartschuller/1903958 to your computer and use it in GitHub Desktop.
@(helloForm: Form[(String,Int,Option[String])])
@import helper._
@main(title = "The 'helloworld' application") {
<h1>Configure your 'Hello world':</h1>
@form(action = routes.Application.sayHello, args = 'id -> "helloform") {
@inputText(
field = helloForm("name"),
args = '_label -> "What's your name?", 'placeholder -> "World"
)
@inputText(
field = helloForm("repeat"),
args = '_label -> "How many times?", 'size -> 3, 'placeholder -> 10
)
@checkbox(
field = helloForm("options"),
args = '_label -> "With sugar on top", 'value -> "sugar"
)
@checkbox(
field = helloForm("options"),
args = '_label -> "black", 'value -> "Black"
)
@select(
field = helloForm("color"),
options = options(
"" -> "Default",
"red" -> "Red",
"green" -> "Green",
"blue" -> "Blue"
),
args = '_label -> "Choose a color"
)
<p class="buttons">
<input type="submit" id="submit">
<p>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment