Save 36% for Black Friday! Learn more

Robert Reiz

Joined

20 Experience
0 Lessons Completed
0 Questions Solved

Activity

My pragmatic solution for right is this:

<%= f.submit :class => "btn btn-primary brndc", 
           :value => t('general.btn_update'),
           :onclick => "this.form.submit(); this.disabled=true; this.value='Sending…';" %>

I exactly followed the example, but it doesn't work for me. The form is submitted but the button is not disabled and the text is not changing. Do I miss some JS magic? Any ideas?