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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   3062 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