@(computerForm: Form[Computer], companies: Map[String, String])(implicit request: Http.Request, messages: play.i18n.Messages) @import helper._ @implicitField = @{ FieldConstructor(tags.forms.field_constructor.render) } @main {

Add a computer

@form(routes.HomeController.save()) { @CSRF.formField
@inputText(computerForm("name"), Symbol("_label") -> "Computer name", Symbol("_help") -> "")
@inputDate(computerForm("introduced"), Symbol("_label") -> "Introduced date", Symbol("_help") -> "")
@inputDate(computerForm("discontinued"), Symbol("_label") -> "Discontinued date", Symbol("_help") -> "")
@select( computerForm("company.id"), options(companies), Symbol("_label") -> "Company", Symbol("_default") -> "-- Choose a company --", Symbol("_showConstraints") -> false )
or Cancel
} }