Hello all!
I'm trying to get a Form into a custom controller. I've used the post at http://doc.silverstripe.org/doku.php?id=controller to play around with the custom controller, and now I'm trying to get a form into that page, but it just shows up blank, and I'm not understanding why. Here's a sample of the code I'm using in FastFood.php
class FastFood_Controller extends Controller {
function order($arguments) {
print_r($arguments);
}
function newOrder() {
$fields = singleton('SomeObject')->getFrontendFields();
$actions = new FieldSet(
new FormAction('someAction', 'Submit')
);
$form = new Form(
$this,
'Form',
$fields,
$actions
);
return $form;
}
}
Any ideas where I'm going wrong? Thanks!