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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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

Controlling a Class on a specific 'Branch'


Go to End


11 Posts   2172 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, 1391 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