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

implements container.formGroupClass parameter to pass or disable classes #406

Merged
merged 5 commits into from
Nov 20, 2024

Conversation

skie
Copy link
Contributor

@skie skie commented Nov 17, 2024

Implements container.formGroupClass parameter to pass or disable classes different from form-group to containers.

When defined complex fields that should have their own containers, now possible to assign the .form-group class at wrapper level, while the inner fields rendered by FriendsOfCake/bootstrap-ui would not have it.

@ADmad ADmad changed the base branch from master to next November 17, 2024 04:32
unset($options['container']);

$options['templateVars']['formGroupClass'] = 'form-group';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$options['templateVars']['formGroupClass'] = 'form-group';
$options['templateVars']['formGroupClass'] ??= 'form-group';

This allows setting the template var directly too instead of the custom option.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I simplify logic based on your suggestion.

@ADmad ADmad merged commit 47fe212 into FriendsOfCake:next Nov 20, 2024
7 checks passed
@ADmad
Copy link
Member

ADmad commented Nov 29, 2024

Hmm.. Bootstrap 5.3 has dropped form-group and friends, so I am now wondering what good does this change do.
https://getbootstrap.com/docs/5.3/migration/#forms-1

@ADmad
Copy link
Member

ADmad commented Nov 29, 2024

Actually they have been dropped since 5.0 https://getbootstrap.com/docs/5.0/migration/#forms

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.

2 participants