mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
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…
x
Reference in New Issue
Block a user