I have a data model that basically boils down to:
- Page has_many Views
- View has_many PageReferences
- PageReference has_one Page and has an integer "Sort"
I've played with a couple of the *ComplexTableField form field options. They are really nice for some things, but not what I need. I need something that will allow management of the "View has_many PageReferences" and "PageReference has_one Page" relationships. At its core, I need something that will:
- List all of the current values contained in a has_many relationship (list all the page references a view has)
- Allow re-ordering of those values (pagereferences in this case)
- Allow deletion of some of the values in the list
- Allow the addition of a new value by a popup (in this case, a popup that would allow you to select a page from your SiteTree)
Of course, that's only the View->PageReference relationship. I'll also need a very similar form control for listing the views a page contains and allowing you to add a new one. But, I think if I can solve the problem above, this secondary problem is so similar that it will be no problem.
I figure that I'll need to create a custom FormField for this. My question is: where should I start? What should it extend? And do you have any documentation on what to do / to avoid when making a FormField?
I've attached a mockup of roughly what I want this tab to look like.