Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dbjpanda opened this issue Dec 5, 2023 · 3 comments

Comments

@dbjpanda
Copy link

dbjpanda commented Dec 5, 2023

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
                                  ]
                             ] 
                        ]
                ]
           ]
@wpiraniir
Copy link

wpiraniir commented Dec 17, 2023

Did you want use defaults outside fieldset? like this:
https://codestarframework.com/documentation/#/fields?id=fieldset
its better for me

@dbjpanda
Copy link
Author

@wpiraniir I am facing issues when I put fieldset inside fieldset.

@dbjpanda dbjpanda changed the title Default values are never saved for fieldset type Default values are never saved for fieldset type when putting fieldset within fieldset Dec 21, 2023
@dbjpanda
Copy link
Author

dbjpanda commented May 7, 2024

@Codestar Any update on this issue please? This seems to be a major issue to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants