useranon
useranon

Reputation: 29514

Formhelper to add a line Break in cakephp

The Form helper in cakephp

  echo $form->input('Firstname', array('class'=>'test','name'=>'Firstname','type'=>'text'));

generates me like the following

   <div class="input text">
      <label for="Firstname">Frrstname</label>
      <input type="text" id="Firstname" value="" class="test" name="Firstname"/>
   </div>

is it possible to add a Break between label and input within the DIV .. If so how .. please suggest

Upvotes: 1

Views: 2206

Answers (2)

Abba Bryant
Abba Bryant

Reputation: 4012

 echo $form->input('Firstname', array( 'between'=>'<br />','class'=>'test','name'=>'Firstname','type'=>'text'));

Upvotes: 0

gertov
gertov

Reputation: 188

I would suggest not adding the break.

Just use css:

label{display:block}

would achieve the same result.

Upvotes: 2

Related Questions