mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #523 from ohararyan/issues/update-multi-option
Make sure option gridfield is created before UpdateCMSFields
This commit is contained in:
commit
bbd81d2bb0
@ -33,8 +33,7 @@ class EditableMultipleOptionField extends EditableFormField
|
||||
*/
|
||||
public function getCMSFields()
|
||||
{
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$this->beforeUpdateCMSFields(function($fields) {
|
||||
$editableColumns = new GridFieldEditableColumns();
|
||||
$editableColumns->setDisplayFields(array(
|
||||
'Title' => array(
|
||||
@ -77,6 +76,9 @@ class EditableMultipleOptionField extends EditableFormField
|
||||
|
||||
$fields->insertAfter(new Tab('Options', _t('EditableMultipleOptionField.OPTIONSTAB', 'Options')), 'Main');
|
||||
$fields->addFieldToTab('Root.Options', $optionsGrid);
|
||||
});
|
||||
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user