752 Posts in 310 Topics by 289 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 3229 Views |
-
Drop down list in getCMSFields

3 February 2009 at 9:35am
I am trying to get a drop down list of all the folders under assets. I think I need to do something with enum(?) but I am not sure where to go with it. Could anyone give me a pointer? Thank you
-
Re: Drop down list in getCMSFields

3 February 2009 at 10:56am
$fields->addFieldToTab("Root.Content.Main", new DropdownField('Folders','Choose a folder', DataObject::get("Folder")->toDropdownMap()));
-
Re: Drop down list in getCMSFields

3 February 2009 at 5:53pm
Let me explain a little bit more. I am making a custom widget for one of my sites. With the widget permitted members will be able to upload files directly to the the chosen folder (The folder will be chosen by the admin, when the widget is added to the page.). I need to be able to get a drop down list as a select/option in the admin section for the admin to choose which folder the uploads will be to.
Thank you for the above code, but I'm not sure if that's what I am looking for or not. Where would that go?
-
Re: Drop down list in getCMSFields

3 February 2010 at 2:03am
That helped me heaps, thanks so much UC.
-
Re: Drop down list in getCMSFields

14 October 2010 at 1:29pm
Uncle Cheese:
How would you do this for picking an image within the folders. Like the image picker works in the WYSIWYG within the content field?
| 3229 Views | ||
|
Page:
1
|
Go to Top |



