Hi all,
I have made a new page type, extending a standard UserDefinedForm installation:
class SpecialOffersForm extends UserDefinedForm {
/**
* @var String Add Action in the CMS
*/
static $add_action = "A Special Offers Form";
/**
* @var String Icon for the User Defined Form in the CMS. Without the extension
*/
static $icon = "cms/images/treeicons/task";
/**
* @var String What level permission is needed to edit / add
*/
static $need_permission = 'ADMIN';
/**
* @var Array Fields on the user defined form page.
*/
static $db = array(
);
/**
* @var Array Default values of variables when this page is created
*/
static $defaults = array(
'Content' => '$SpecialOffersForm',
'DisableSaveSubmissions' => 0,
'OnCompleteMessage' => '<p>Thanks, we\'ve received your submission.</p>'
);
....
}
I extended it as this form will always have a default set of fields and I have worked out how to automatically create these feilds when a new SpecialOffersForm is created in the CMS. This is so the client does not need to go through the process of setting up the form every time they create a page of this type.
Works fine in the CMS, however when I go to look at it on the frontend, all I get is a blank white page with "SpecialOffersForm" printed. No HTML in the source, so the default Page.ss is not being loaded at all.
Am I wrong to assume that because the above class extends UserDefinedForm, which in turn extends Page, that my new class will be rendered using Page.ss
Ta
Aaron