自定义提交按钮 [英] Custom Submit button

查看:196
本文介绍了自定义提交按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建提交按钮,并在其上​​定义自定义标题,加上自定义类的风格呢?

how can i create submit button, and define custom title on it, together with custom class style?

在TNX进阶!

推荐答案

还记得,你总是可以做到这一点的老同学

Also remember, you can always do it old school

我preFER使用 $这个 - >&形式 - GT;结束(); 不带任何参数,并建立自己的提交按钮和标记。这很容易

I prefer to use $this->Form->end( ); without arguments and build my own submit buttons and markup. It's easy

<div class="buttons clearfix">
    <button type="submit" class="positive">
        <span class="icon-wrapper"><img src="path/to/tickmark.png" alt="" title="" /></span>
        Save Item
    </button>
</div>

我也想告诉你用 $这个 - &gt将实验;形式 - &GT;输入('Model.field','选择'=&GT;阵列(阵列('类型'=&GT ;'按钮'))); - 尤其是前,后,和类选项之间。你可以使用助手创建&LT;输入类型=按钮/方式&gt; 元素具有良好程度的灵活性。

I would also tell you to experiment with the $this->Form->input('Model.field', 'options' => array( array('type' => 'button'))); - particularly the before, between, after, and class options. You can use the helper to create <input type="button" /> elements with a good amount of flexibility.

这篇关于自定义提交按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆