Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Controlling a Class on a specific 'Branch'


Go to End
Reply


11 Posts   1458 Views

Avatar
MagicUK

Community Member, 60 Posts

19 August 2011 at 6:57am

Whoops we both replied at the same time there!

Avatar
martimiz

Forum Moderator, 1132 Posts

19 August 2011 at 7:08am

The odds... :-) Anyway, I don't know about the getField thing - never had to use them, and it's been a while since I used the UserForms. But when located at the current page controller, at least the query might look something like this:

function ShowForm(){
$get = DataObject::get_one('UserDefinedForm', "ParentID = '{$this->ParentID}' AND Title = 'BrochureForm'");
return new UserDefinedForm_Controller($get);
}

Avatar
MagicUK

Community Member, 60 Posts

19 August 2011 at 7:16am

Mate. I could honestly kiss you. haha. That worked! My troubles are solved! (At least until tomorrow)

Thanks!

Go to Top