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

Getting Relationship before DO is created?


Go to End


1014 Views

Avatar
sonet

Community Member, 33 Posts

24 September 2013 at 1:24pm

Hi, I am wondering if there is a better solution for the following:
- TourPage has_many Routes has_many Places.
- when clicking on "Create a new Place" the object does not exists yet (it does not have an ID/HasManyID (until it is saved to the database)

Is it possible to get the RouteID within the Place getCMSFields() (that is being called during the form scaffolding before the DO is saved/created)?

As of now I am asking the user to save the object first before showing the relationship dependent fields.