Reputation: 1259
I need help wrapping my head around how to complete a system in Silverstripe.
There is a page where an authorized user can manage archives. This is NOT in the cms. It is a front end system.
I need to be able to walk the user through creating the following:
1. Archive (it has a year and title)
2. every archive can have many sections with (title, description)
3. every section can have many items with (photo, description)
I can create the three dataObjects but I can not figure out how to:
1. relate them using $many_many or $has_many
2. create a form for each step so the user can add the three different pieces.
This would be easy in straight PHP/MySql but Silverstripe is new to me. I don't need the code per se, just an explanation of how the pieces work together to get what I want. The docs and forums are scarce on silverstripe.org
Upvotes: 0
Views: 222
Reputation: 3328
In order to understand the data model it is best to complete the lessons / read the documentation.
As for the multi page form this module...
... is perfect for you as it manages multiple forms and temporarily stores all the data, allowing the user to go backwards and forwards through the steps, and only at the last step when all is confirmed is all the temporary data actually processed with one function to create the required objects and relationships.
This module has a fantastic README.md on github and guides you through creating a form very well.
Upvotes: 2