如何在 CakePHP 3.x 中显示复选框?或在 CakePHP 中显示复选框的模板 3.x

How to display checkbox in CakePHP 3.x? Or template to display Check boxes in CakePHP 3.x

我有要显示的代码:-

<div class="row form-group m-form__group m-login__form-sub">
  <div class="col m--align-left">
    <label class="m-checkbox m-checkbox--light">
      <input type="checkbox" name="agree">I Agree the
      <a href="#" class="m-link m-link--focus">terms and conditions</a>.
      <span></span>
    </label>
    <span class="m-form__help"></span>
 </div>
</div>

那么如何使用 FormHelper 转换它。或者如何创建相同的模板?

这里我提到了 cakephp 的创建方式 checkbox.Try it.Hope 它有效。

<div class="row form-group m-form__group m-login__form-sub">
  <div class="col m--align-left">
    <?php echo $this->Form->input('agree', array(
     'type'=>'checkbox','label'=>'I Agree The'));?>
    <a href="#" class="m-link m-link--focus">terms and conditions</a>
</div>