I cannot figure this one out..
I want to have form on every page, it shows up fine on the frontpage, but as soon as I go to subpage, i am getting following error:
[User Error] Uncaught Exception: Object->__call(): the method 'fortemplate' does not exist on 'UserDefinedForm_Controller'
GET /silverstripe/stotte/
Line 724 in /home/childyef/public_html/silverstripe/sapphire/core/Object.php
Source
715
716 default :
717 throw new Exception (
718 "Object->__call(): extra method $method is invalid on $this->class:" . var_export($config, true)
719 );
720 }
721 } else {
722 // Please do not change the exception code number below.
723
724 throw new Exception("Object->__call(): the method '$method' does not exist on '$this->class'", 2175);
725 }
726 }
727
728 // -----------------------------------------------------------------------------------------------------------------
729
730 /**
Trace
* Object->__call(forTemplate,Array)
Line 447 of ViewableData.php
* UserDefinedForm_Controller->forTemplate()
Line 447 of ViewableData.php
* ViewableData->XML_val(Form,,1)
Line 41 of .cache.home.childyef.public_html.silverstripe.themes.cbcf.templates.Layout.Page.ss
* include(/tmp/silverstripe-cache-home-childyef-public_html-silverstripe/.cache.home.childyef.public_html.silverstripe.themes.cbcf.templates.Layout.Page.ss)
Line 420 of SSViewer.php
* SSViewer->process(StandardSide_Controller,Zend_Cache_Frontend_Output)
Line 411 of SSViewer.php
* SSViewer->process(StandardSide_Controller)
Line 202 of Controller.php
* Controller->handleAction(SS_HTTPRequest)
Line 137 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
* Controller->handleRequest(SS_HTTPRequest)
Line 199 of ContentController.php
* ContentController->handleRequest(SS_HTTPRequest)
Line 67 of ModelAsController.php
* ModelAsController->handleRequest(SS_HTTPRequest)
Line 281 of Director.php
* Director::handleRequest(SS_HTTPRequest,Session)
Line 124 of Director.php
* Director::direct(/stotte/)
Line 127 of main.php
I am using 2.4.1, and $getForm.Form in template
I have php file, ss file in templates and another ss file in layout folder.. :)
plz help? thank you!