Multiple record insertion prevent |
HI , sorry for english , if i press send form button several time i have an insertion for every button press , how can i prevent it?
How to prevent form from submitting multiple times from client side?
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(07-09-2021, 05:25 AM)InsiteFX Wrote: How to prevent form from submitting multiple times from client side? Validation prevent form submitting ? Or must i use ever js ? Code: prevent with js
Enlightenment Is Freedom
Disabling the button with JS is good for the client side validation and for UX (user experience). But you can also add a CSRF token to your form to reject the other requests. Only the first one will have a valid token and the other will be rejected. Some people (or bots) disable JS, so it's always a good idea to validate data on the server.
|
Welcome Guest, Not a member yet? Register Sign In |