codestar-framework
codestar-framework copied to clipboard
Default values are never saved for fieldset type when putting fieldset within fieldset
I am facing a strange issue, the default value of the fields that are inside fieldset are never stored in options table until I press save button from fronted.
CSF::createSection($this->prefix, [
'title' => 'User Fields',
'parent' => 'global-tab',
'icon' => 'fa fa-cog',
'fields' => [
[
'id' => 'foo',
'type' => 'foo',
'default' => 'Foo' // This value is saved
],
[
'id' => 'user-fields',
'type' => 'fieldset',
'fields' => [
[
'id' => 'basic',
'type' => 'fieldset',
'title' => 'Basic Fields',
'fields' => [
[
'id' => 'bar',
'type' => 'text',
'default' => 'Bar' // This field is never saved
]
]
]
]
]
Did you want use defaults outside fieldset? like this: https://codestarframework.com/documentation/#/fields?id=fieldset its better for me
@wpiraniir I am facing issues when I put fieldset inside fieldset.
@Codestar Any update on this issue please? This seems to be a major issue to me.