I'm adding a custom drop down to the userform module and everything seemed to work, however:
If I set the following:
Textfield One - Dropdown option one
Textfield Two - Dropdown option two
It seems to only save the the setting under Textfield One, and ignores Textfield Two. If I then go back and set Textfield Two again, it wipes out Textfield One.
Am I supposed to iterate over something save each value independently or ...?
//config.yml
EditableFormField:
extensions:
- CustomEditableFormField
//CustomEditableFormField.php
class CustomEditableFormField extends DataExtension
{
public function updateFieldConfiguration(FieldList $fields)
{
$fields->push(DropdownField::create($this->owner->getSettingName('CustomTextId'), 'Custom field')
->setSource(array("1" => "One", "2" => "Two"))
->setEmptyString($this->owner->getSetting('CustomTextId')));
}