form()
helper expects a play.api.mvc.Call
as an action, so you need to prepare it somehow, ie in controller, like this:
public static Result newForm(String arg1, String arg2) {
play.api.mvc.Call saveAction = routes.Application.saveForm(arg1, arg2);
return ok(newFormView.render(saveAction));
}
and then just pass saveAction
into first argument of form
helper:
@(saveAction: play.api.mvc.Call)
@helper.form(saveAction){
@* form fields *@
}