如何使用FormHelper获取特定输入

1 cakephp cakephp-2.0

有没有办法使用FormHelper执行此操作:

<button type="submit" class="btn"><i class="icon-search"></i> Sign in</button>
Run Code Online (Sandbox Code Playgroud)

我尝试使用$this->Form->end();它,但它不能按我的意愿工作.

tha*_*tah 5

你读过这本手册了吗?好像这就是你要找的东西;

创建按钮并提交元素

这样的事情应该可行;

echo $this->Form->button(
    '<i class="icon-search"></i> Sign in',
    array('class' => 'btn', 'escape' => false)
);
Run Code Online (Sandbox Code Playgroud)