Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to modify parameters like (style , class ..) in cakephp input?

in cakephp

echo $this->Form->input('email', array('type' => 'email'));

will render

<div class="input email">
<label for="UserEmail">Email</label>
<input type="email" name="data[User][email]" value="" id="UserEmail" />

how to make this like that

    <input type="email" name="data[User][email]" value="" id="UserEmail" class="input_class" style="some:style;" />
like image 669
Alsemany Avatar asked Mar 18 '26 10:03

Alsemany


1 Answers

Just add a "class" and/or "style" argument to your options array.

echo $this->Form->input('email', array('type' => 'email', 'class' => 'input_class', 'style' => 'some:style' ));

See the the FormHelper documentation for a list of all options.

like image 119
nullability Avatar answered Mar 21 '26 00:03

nullability