I want to give my CMS admins the ability to create a custom form on a few page templates. The pages are not "form pages" per se, but they do allow a form to be included on them. So I have set up a many-many relationship between the extended form class and the pages that I want the form to appear on. A user creates a form in the CMS and then via the ManyManyComplexTableField can assign the form to a template with the many-many relationship.
My problem is that everything seems to be working fine except when the template prints the form, it literally prints "$RightColumnForm" (the name of my extended class) instead of the actual form.
I extended /userforms/code/UserdefinedForm.php class and changed the default content template to my new content template:
/mysite/code/RightColumnForm.php
class RightColumnForm extends UserDefinedForm {
// ...
static $defaults = array (
'ShowInMenus' => false
,'ShowInSearch' => false
,'Content' => '$RightColumnForm'
);
// ...
}
Created my form template:
/themes/mytheme_userforms/templates/Includes/RightColumnForm.ss
<div>
$Content
</div>
Included that template in my page:
/themes/mytheme/templates/Includes/mypage.ss
<% include RightColumnForm %>
Screenshot of the problem attached.
Thanks,
Chris.b