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

Getting Relationship before DO is created?


Reply

235 Views

Avatar
sonet

24 September 2013 at 1:24pm Community Member, 33 Posts

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.