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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Dropdownfield doesn't seem to work inside getCMSFields_Popup

Go to End

2 Posts   1675 Views


Community Member, 13 Posts

13 August 2008 at 10:37am

Edited: 13/08/2008 10:47am

hi all,

Need to show a dropdownfield inside the popup of a CMF, it shows up, but when i click save it keeps forever trying to.
Removing the dropdownfield from the fieldset, works fine!!!
Here is my code, any ideas? same problem anywhere?

	function getCMSFields_forPopup() {		
		$fields = new FieldSet();          			
		$fields->push( new TextField( 'Name', 'First Name' ));
		$fields->push(new TimeField('Time','Time','00:00','G:i'));
                here comes the problem
		$fields->push(new DropdownField('Weekday',
						'Day of the week',
                                                         '2'=>'Monday' ... and so on
	            return $fields;      

Weekday is enum type in $db



Forum Moderator, 5523 Posts

13 August 2008 at 12:23pm

It should work fine. Try a capitial E on enum as it is referring to the Enum class in SS so enum might not exist. Then make sure you db/build