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.

Form Questions

DropdownField with optional TextField ?


Reply

796 Views

Avatar
brice

31 March 2010 at 6:35am Community Member, 51 Posts

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!