-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
ActiveField | Additional fields: checkbox #61
Comments
How does the rendered content look like (html)? |
The code view:
is rendered like this:
|
Do you override the default template of the active-fields, e.g in active-form? |
No: nothing at all. I've only issued: /usr/local/bin/composer create-project --prefer-dist yiisoft/yii2-app-advanced testapp, and it came to pass that BS5 was installed. BTW: I've tested:
and it runs flawlessly. |
@WinterSilence I resolved using SwitchInput from kartik library:
|
@numitec sorry but its look like fake - your example in unit test |
@WinterSilence, I didn't quite follow you. Could you elaborate it? |
What steps will reproduce the problem?
I tried to change the vanilla Yii2 checkbox from:
$form->field($model, 'active')->checkBox()
to:
$form->field($model, 'active')->checkBox( ['switch' => True] )
in order to show a fancy switch.
What is the expected result?
Reading the English Guide: https://github.com/yiisoft/yii2-bootstrap5/blob/master/docs/guide/usage-widgets.md, I was expecting to find a beauty switch like: https://getbootstrap.com/docs/5.1/forms/checks-radios/#switches
What do you get instead?
The same checkbox that comes out of the box with Yii2.
Additional info
The text was updated successfully, but these errors were encountered: