Hi,
Hoping someone can help me... I need to generate an array of arrays in order to populate a GroupedDropdownField on a form.
I have an TrekPage class that lets users add multiple TrekDates via a DataObjectManager, each with a StartDate and EndDate field. I'd love to be able to write a function that iterates through the available TrekPages and creates an array for each consisting of dates, each of which is the result of a function that determines the range of the TrekDate's StartDate & EndDate (like this http://silverstripe.org/template-questions/show/267739#post267739).
i know i can use things like $this->toArray(); (http://doc.silverstripe.org/doku.php?id=dataobjectset) but haven't had much luck so far. And sorry if the above isn't explained very clearly, I'm new to a lot of this..
Thanks,
jack