Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
20 lines (17 sloc) 0.639 kB
@**
* Generate an HTML input text.
*
* Example:
* {{{
* @inputText(field = myForm("name"), args = 'size -> 10, 'placeholder -> "Your name")
* }}}
*
* @param field The form field.
* @param args Set of extra attributes.
* @param handler The field constructor.
*@
@(field: play.api.data.Field, args: (Symbol,Any)*)(implicit handler: FieldConstructor, messages: play.api.i18n.Messages)
@inputType = @{ args.toMap.get('type).map(_.toString).getOrElse("text") }
@input(field, args.filter(_._1 != 'type):_*) { (id, name, value, htmlArgs) =>
<input type="@inputType" id="@id" name="@name" value="@value" @toHtmlArgs(htmlArgs)/>
}
Jump to Line
Something went wrong with that request. Please try again.