-
Notifications
You must be signed in to change notification settings - Fork 145
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
Change default style configuration #200
Comments
The plugin employs the same string templating system that CakePHP core uses. https://book.cakephp.org/3.0/en/views/helpers/form.html#customizing-the-templates-formhelper-uses |
Thanks for answer , still , i cant change checkbox class, this is my code
and my
and when i inspect the checkbox , i saw |
Can you gist your entire AppView? |
Sure
|
Are you loading CrudView or some other view class? |
No at all , if i remove default style in your plugin source code , everything works fine but with $default checkbox not working |
I have same problem with checkbox, if I use <?php
$form_template = [
'checkbox' => '<div class="col-sm-10"><input type="checkbox" class="js-switch" name="{{name}}" value="{{value}}"{{attrs}}></div>',
'checkboxFormGroup' => '<div class="%s">{{label}}{{error}}{{help}}</div>',
'nestingLabel' => '<label class="col-sm-2 control-label" {{attrs}}>{{text}}</label>{{input}}'
];
$this->Form->setTemplates($form_template);
?> not work, if I set template in control() it works <?php
echo $this->Form->control('online', ['type'=>'checkbox','templates'=>[
'checkbox' => '<div class="col-sm-10"><input type="checkbox" class="js-switch" name="{{name}}" value="{{value}}"{{attrs}}></div>',
'checkboxFormGroup' => '<div class="%s">{{label}}{{error}}{{help}}</div>',
'nestingLabel' => '<label class="col-sm-2 control-label" {{attrs}}>{{text}}</label>{{input}}',
]]);
?> |
How to change the default style configuration
im wondring if i could change the style while loading the plugin , for example if i would like to change class="btn-default" to something else without touching the source code of the plugin .
Thanks
The text was updated successfully, but these errors were encountered: