Is it possible to render a UserDefinedForm within the template of another page?
I have a page set up with multiple DataObjects (being a block of content) and I need to render the form within these.
I have
class Page extends SiteTree {
private static $has_many = array(
'ContentPanels' => 'ContentPanel'
);
}
Content Panel
<?php class ContentPanel extends DataObject {
private static $has_many = array(
'Forms' => 'FormHolder'
);
?>
FormHolder
<?php class FormHolder extends DataObject {
private static $db = array(
'Title' => 'Text',
'Content' => 'HTMLText',
'SortOrder' => 'Int'
);
private static $has_one = array(
'UserForm' => 'UserDefinedForm',
'ContentPanel' => 'ContentPanel'
);
?>
Is this possible to get the form to display and how might I do it?