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:

Form Questions /

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

DropdownField with optional TextField ?


Go to End


1062 Views

Avatar
brice

Community Member, 52 Posts

31 March 2010 at 6:35am

Is it possible to combine a Dropdown field with a plain text input field? I'm in ModelAdmin and would like to customize a DataObject's varchar field via getCMSFields() to display a dropdown of options as well as an area to add custom input if applicable.

E.g.

"Reason"

[Select]
"reason 1"
"reason 2"
"reason 3"
"other"

[Text] (input used when other selected)

I haven't found a matching fieldtype for this, but am thinking CompositeField(?)

Thanks ahead!