In rails controllers, how to prevent double submit (when user double-clic submit button or hit enter twice)?

后端 未结 8 2301
天命终不由人
天命终不由人 2021-02-19 09:50

Well, everything\'s in the title but I\'ll explain a little more :-)

My rails app contain many forms (Ajaxified or not).

To prevent users to submit twice or more

8条回答
  •  闹比i
    闹比i (楼主)
    2021-02-19 10:06

    You can add the option :disable_with => "Please Wait..." to the submit tag.

提交回复
热议问题