Jump to:

1971 Posts in 1275 Topics by 607 members

Form Questions

SilverStripe Forums » Form Questions » DropdownField with optional TextField ?

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

Page: 1
Go to End
Author Topic: 745 Views
  • brice
    Avatar
    Community Member
    50 Posts

    DropdownField with optional TextField ? Link to this post

    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!

    745 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.