mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
FIX Ensure duplicated multiple option field is written (has an ID) before duplicating options
This commit is contained in:
parent
3e71cf7840
commit
453a35e114
@ -225,6 +225,7 @@ class UserFormFieldEditorExtension extends DataExtension
|
||||
// List of EditableFieldGroups, where the key of the array is the ID of the old end group
|
||||
$fieldGroups = [];
|
||||
foreach ($oldPage->Fields() as $field) {
|
||||
/** @var EditableFormField $newField */
|
||||
$newField = $field->duplicate(false);
|
||||
$newField->ParentID = $this->owner->ID;
|
||||
$newField->ParentClass = $this->owner->ClassName;
|
||||
|
@ -123,7 +123,7 @@ class EditableMultipleOptionField extends EditableFormField
|
||||
$manyMany = null;
|
||||
}
|
||||
|
||||
$clonedNode = parent::duplicate($doWrite, $manyMany);
|
||||
$clonedNode = parent::duplicate(true, $manyMany);
|
||||
|
||||
foreach ($this->Options() as $field) {
|
||||
/** @var EditableOption $newField */
|
||||
|
Loading…
Reference in New Issue
Block a user