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

Group field added #48

Closed
wants to merge 6 commits into from
Closed

Group field added #48

wants to merge 6 commits into from

Conversation

mertasan
Copy link
Contributor

It works like KeyVal. However, the keys of the groups are not added to the form data names. Useful for grouping fields. In this way, special styles can be assigned to each group. In the next process, special permissions can be set for groups. With subsequent enhancements, only groups can be used in other form components.

Group items names do not have the "key" prefix of the group. This is the most important feature that distinguishes it from the other array fields.

For example, 2 different groups can be added and 2 fields in one of the groups and 3 fields in the other can be shown. In this way, we make the grid counts in the form more useful/simple.

Input::make('Full Name')->rules('required'),
Group::make('Group 1 (3 column)')->fields([
    Input::make('Address')->rules('required'),
    Input::make('Postcode')->rules('required'),
    Input::make('Country')->rules('required'),
]),
Group::make('Group 2 (2 column)')->fields([
    Input::make('Product Name')->rules('required'),
    Input::make('Brand')->rules('required'),
]),

Example

@mertasan mertasan closed this Dec 18, 2020
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

Successfully merging this pull request may close these issues.

1 participant