在卡克普
echo $this->Form->input('email', array('type' => 'email'));
将呈现
<div class="input email">
<label for="UserEmail">Email</label>
<input type="email" name="data[User][email]" value="" id="UserEmail" />
怎么做成那样
<input type="email" name="data[User][email]" value="" id="UserEmail" class="input_class" style="some:style;" />
最佳答案
只需在选项数组中添加一个“类”和/或“样式”参数。
echo $this->Form->input('email', array('type' => 'email', 'class' => 'input_class', 'style' => 'some:style' ));
有关所有选项的列表,请参见the FormHelper documentation。