Rails data-disable-with re-enabling button

前端 未结 4 1035
情深已故
情深已故 2021-01-31 03:32

I have a Rails Devise form that has javascript validation. When the user presses submit, the validation works and the user is refocused on the form where they need to be.

4条回答
  •  旧巷少年郎
    2021-01-31 03:57

    Look at my answer.

    $button = $('#someId')
    $.rails.enableElement($button)
    $button.removeAttr('disabled')
    

    https://stackoverflow.com/a/44318786/4349494

提交回复
热议问题