PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, January 20, 2022

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

 January 20, 2022     cakephp, cakephp-3.0     No comments   

Issue

I have code that I'd like to display:-

<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>

So how do I convert it using the FormHelper. Or how to create template for same?


Solution

Here i Mentioned cakephp Way of creating checkbox.Try it.Hope it Works.

<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>



Answered By - Manasa
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing