Hi Everyone,
I have form created by CRUD operations. But I don’t like the sumbit button. Code is as below.
echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save');
I would like to add a custom button/image in the normal submit button place.
Could anyone please help me?
Thank you in advance
Command
(Command)
2
Image Button: http://www.yiiframework.com/doc/api/1.1/CHtml#imageButton-detail
echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save',array('tabindex'=>10));
With the second param you can change the attributes
Edofre
(Edofre)
3
Better way to do this in my opinion is using the css, this way you don’t have to add the htmlOptions to all of the buttons but it will style them all.
.button, input[type="submit"] {
background: #EB2B20 url(../img/bg_button.png) repeat-x;
height: 45px;
width: 200px;
}