removeByName('Default'); return $fields; } /** * @return DropdownField */ public function getFormField() { $field = DropdownField::create($this->Name, $this->EscapedTitle, $this->getOptionsMap()) ->setFieldHolderTemplate('UserFormsField_holder') ->setTemplate('UserFormsDropdownField'); // Set default $defaultOption = $this->getDefaultOptions()->first(); if($defaultOption) { $field->setValue($defaultOption->EscapedTitle); } $this->doUpdateFormField($field); return $field; } public function getSelectorField(EditableCustomRule $rule, $forOnLoad = false) { return "$(\"select[name='{$this->Name}']\")"; } }