Skip to content

Default values are never saved for fieldset type when putting fieldset within fieldset  #172

@dbjpanda

Description

@dbjpanda

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
                                  ]
                             ] 
                        ]
                ]
           ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions