I'd first like to say that I'm completely new to play framework, i got this code from a youtube tutorial by 'whereIsMyDipp' and it's not working, i've looked at the docs and other tutorials and can't figure this one out. the play version that i'm using is 2.3.6 I'm trying to create a basic contacts form using the @helper stuff and i'm getting this error: link to screenshot: http://imgur.com/keKda1G
not found: value contactForm
here is my view:
@import helper._
@import helper.twitterBootstrap._
@(contactForm: Form[Contact])
@main("wat"){
@helper.form(action = routes.Application.contactSubmit()) {
@helper.inputText(contactForm("fName"))
@helper.inputText(contactForm("lName"))
@helper.inputText(contactForm("phone"))
@helper.inputText(contactForm("email"))
@helper.inputText(contactForm("subject"))
@helper.inputText(contactForm("message"))
}
}
and here are the relevant Action methods and model:
public class Contact {
String fName;
String lName;
String phone;
String email;
String subject;
String message;}
final static Form<Contact> contactForm = form(Contact.class);
public static Result ContactUs() {
return ok(ContactUs.render(contactForm));
}
public static Result contactSubmit() {
Form<Contact> filledForm = form(Contact.class).bindFromRequest();
Contact created = filledForm.get();
return ok(submit.render(created));}