Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In HAML how do you add a class to a submit input (button) on a form

I've both tried:

= f.submit, :class => "form_submit"

and

= f.submit { :class => "form_submit" }

It works just fine with just

= f.submit

Here is my full rails form.

= form_for @organization do |f|
  %div
    .description
      = f.label :description
    = f.text_area :description, :rows => 4, :class => 'ckeditor'
  = f.submit, :class => "form_submit"
like image 894
David Ladowitz Avatar asked Aug 22 '13 07:08

David Ladowitz


1 Answers

= f.submit 'button_name',:class => "form_submit"
like image 67
Aman Garg Avatar answered Sep 28 '22 18:09

Aman Garg