Rails 4: Disable submit button after click

前端 未结 5 2066
天涯浪人
天涯浪人 2020-12-15 21:54

I have a form_tag(foo_path(@foo), remote: true, id: \'foo-form\' form and a submit button submit_tag (\"Submit\", :id => \"foo-submit\")

<
5条回答
  •  时光说笑
    2020-12-15 22:32

    use

    submit_tag "Submit", id: "foo-submit", data: { disable_with: "Please wait..." }
    

提交回复
热议问题