How to use play-bootstrap in Twirl templates

179 Views Asked by At

I'm a play noob and I'm having an hard time trying to figure out which import(s) I need and where to put them in order to use play-bootstrap. I've added the library as a dependency ("com.adrianhurt" %% "play-bootstrap" % "1.5.1-P27-B4"), then in my template, I'm trying to use:

@b4.vertical.form(routes.AccountController.handleSubscriptionForm) { implicit vfc =>
    @helper.CSRF.formField

    @b4.email(form("email"))
    // ...and so on
}

But the template fail to compile with a weird error message:

Expected '"' but found 'EOF'

I'm sure I need somehow to import @b4 into the template context but I don't understand how.

PS. I'm able to use the "standard" play helpers without any issue, the following works perfectly:

@helper.form(routes.AccountController.handleSubscriptionForm) {
    @helper.CSRF.formField

    @helper.inputText(form("email"))

What I have to do in order to use the play bootstrap helpers?

0

There are 0 best solutions below