# Rails form\_for submit button

**URL:** <https://www.ruby-forum.com/t/rails-form-for-submit-button/173829>\
**Category:** Rails\
**Created:** [August 16, 2009, 5:50am UTC](https://www.ruby-forum.com/t/rails-form-for-submit-button/173829 "2009-08-16T05:50:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ritvvij](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Ritvvij](https://www.ruby-forum.com/u/Ritvvij)\
**Post date:** [August 16, 2009, 5:50am UTC](https://www.ruby-forum.com/t/rails-form-for-submit-button/173829/1 "2009-08-16T05:50:51Z")

</div>

Hi,

Presently the submit button is coming as a button in below case.

\<% form\_for @chapter do |chapter\_form| %\>  
… labels  
… text\_areas…  
\<%= chapter\_form.submit ‘Create’ %\>

I want to build a custom button in CSS and show that instead of the  
button.

Can anyone help me please?

---

<div class="post-metadata">

**Author:** ![Ritvvij](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Ritvvij](https://www.ruby-forum.com/u/Ritvvij)\
**Post date:** [August 16, 2009, 6:25am UTC](https://www.ruby-forum.com/t/rails-form-for-submit-button/173829/2 "2009-08-16T06:25:51Z")

</div>

Ritvvij wrote:

> Hi,
> 
> Presently the submit button is coming as a button in below case.
> 
> \<% form\_for @chapter do |chapter\_form| %\>  
> … labels  
> … text\_areas…  
> \<%= chapter\_form.submit ‘Create’ %\>
> 
> I want to build a custom button in CSS and show that instead of the  
> button.
> 
> Can anyone help me please?

use style attribute with button

---

<div class="post-metadata">

**Author:** ![Ritvvij](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/bbce88/32.png) [@Ritvvij](https://www.ruby-forum.com/u/Ritvvij)\
**Post date:** [August 17, 2009, 9:26pm UTC](https://www.ruby-forum.com/t/rails-form-for-submit-button/173829/3 "2009-08-17T21:26:01Z")

</div>

\<%= chapter\_form.submit “Create”, :class =\> “my-css-button-class” -%\>
