How to Prevent Users from Submitting a Form Twice

后端 未结 16 1015
挽巷
挽巷 2020-12-01 06:59

when user click add button twice, from get submitted twice with same dat

16条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-01 07:40

    You can use JavaScript.

    Attach form.submit.disabled = true; to the onsubmit event of the form.

    A savvy user can circumvent it, but it should prevent 99% of users from submitting twice.

提交回复
热议问题