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

Advanced table field #34

Open
guleswine opened this issue May 9, 2022 · 1 comment
Open

Advanced table field #34

guleswine opened this issue May 9, 2022 · 1 comment

Comments

@guleswine
Copy link

guleswine commented May 9, 2022

hi guys.
due to the fact that repeatable field do not work inside relationships field https://github.com/Laravel-Backpack/CRUD/issues/4109#issue-1111328571?ref=https://githubhelp.com

and also for those who want to use the compactness of the table field

I decided to slightly modify the standard table field for convenience, to support standard html input types, with the ability to set a default value and attributes
(checked: text, number, date, checkbox, select)

[
                    'label'=>'Answers',
                    'name' => 'answers',
                    'type' => 'extended_table',
                    'columns'         => [
                        'answer'=>[
                            'label'=>'Question',
                            'type'=>'text',
                            'attributes'=>[
                                'placeholder'=>'Answer'
                                ],
                            ],
                        'date'=>[
                            'label'=>'Date',
                            'type'=>'date'
                        ],
                        'is_right'=>[
                            'label'=>'Right',
                            'type'=>'checkbox',
                            'default'=>true
                            ],
                        'type'=>[
                            'label'=>'Type',
                            'type'=>'select',
                            //'default'=>'3',
                            'options'=>[
                                '1'=>'One',
                                '2'=>'Two',
                                '3'=>'Three',
                            ],
                        ]
                    ],
                    'min'=>1,
                    'wrapper' => [
                        'class' => 'form-group col-md-8',
                    ],
                ]

extended_table

But of course I can't just post this code because it's based on a table field, a that is now part of a private PRO package (which brings us back to this discussion https://github.com/Laravel-Backpack/CRUD/discussions/4192)

I do not pretend to anything, I am ready to share the idea / development (perhaps this version of the table will be included in the PRO package, and the usual table will remain in the public domain)

@tabacitu tabacitu changed the title Extended Table field Advanced table field May 11, 2022
@tabacitu
Copy link
Member

WHAT?! I love it, it looks like a great idea @guleswine !

I've just sent you an email to schedule a quick call, I think it'll be faster that way.

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

No branches or pull requests

2 participants