0
votes

I need to add bootstrap custom checkbox class beside the default "input checkbox" div and add class to label so that I can get bootstrap checkbox layout using cakephp 3 form helper.

1

1 Answers

0
votes
$this->Form->control('status', [
  'class' => 'custom-control-input',
  'templates' => [
    'inputContainer' => '<div class="custom-control custom-checkbox input {{type}}{{required}}">{{content}}</div>',
    'nestingLabel' => '{{input}} <label{{attrs}} class="custom-control-label">{{text}}</label>'
  ],
]);