CakePHP Archive
Following are the methods through which we can create Textbox in CakePHP. Example 1: echo $this->Form->input(‘usrUsername’); Above code will render following output in view: <div class=”input text”> <label for=”UserUsrUsername”>Usr Username</label><input name=”data[User][usrUsername]” type=”text” id=”UserUsrUsername”/> </div>
To create a form in CakePHP we can use careate() method. Let’s take an example with cake1 as a root folder and users is a table. <?php echo $this->Form->create(); ?> Above code will render following output in view: <form action=”/cake1/users/” id=”UserIndexForm” method=”post” accept-charset=”utf-8″> In create function parameters are optional. If we call this function without