I been struggling. Basically I would like design a form where the dropdown field is auto generated from existing database:
$f->push(new DropdownField('Extras',_t('CalendarDateTime.EXTRA','Extra', $this->getExtraOptions())));
Where getExtraOptions() returns for dropdown values. I would like this to be a required field, thus user will need to choose something from the dropdown menu. However, if user can't find best match in the dropdown, he/she will need to input the value in a textfield.
I was thinking to create a radiobox, if a value is selected then user need to choose a value from a dropdown, if other value is selected then user will need to put something on a text field.
How do I do this in Silverstripe?
Many thanks in advance.