Elliot
Elliot

Reputation: 13855

:disable_with for submit button, Rails 3, JQuery

I'm trying to get :disable_with to work on my button. I'm using JQuery though, and the form is not a javascript implements form, so I'm wondering if theres a better way to make this work?

Upvotes: 0

Views: 974

Answers (2)

Swapnil Chincholkar
Swapnil Chincholkar

Reputation: 2909

disable_with option is deplrecated since rails 3.2.5, So disable with should be used as

%button.btn.large.primary{:type => "submit", :data => {'disable-with' => 'Please wait...'}} Save

Please refer to api documentation

Upvotes: 0

gjb
gjb

Reputation: 6317

Unfortunately, :disable_with will not work without Javascript. This is needed to modify the DOM.

Upvotes: 2

Related Questions