Pass through enableDefaults config to nested forms
This should allow default values to be used in nested form fields within new repeater items. Fixes #4380.
This commit is contained in:
parent
36c69a063b
commit
a7bc442df5
|
|
@ -49,6 +49,10 @@ class NestedForm extends FormWidgetBase
|
|||
$config->arrayName = $this->getFieldName();
|
||||
$config->isNested = true;
|
||||
|
||||
if (object_get($this->getParentForm()->config, 'enableDefaults') === true) {
|
||||
$config->enableDefaults = true;
|
||||
}
|
||||
|
||||
$widget = $this->makeWidget(Form::class, $config);
|
||||
$widget->bindToController();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue