Login

Username or Password is Incorrect!
Enter your Username and Password!

Username

Password

Forgot passsword?

Topics: 15   |   Posts: 10   |   Comments: 12   |   Members: 151


HTML Assistance

Disabling Duplicate Form Data on Submission [ last update: Dec-31-69 06:00 pm ]

If you utilize forms on your website and want to ensure that there are no duplicate entries on a single submission, then you can use this simple code.


<!-- to be placed on the button relative to it href -->
onsubmit=\"this.disabled=\'disabled\';\"

What this operator does is it disables the button once it has been clicked disabling duplicate submissions. Here is a sample utilization of the code.

<form method=\"post\" action=\"/location/to/form-handler.php\">
<br />
<input type=\"text\" name=\"my-text\" value=\"\"> <br />
<textarea name=\"description\" cols=\"50\" rows=\"20\"></textarea> <br />
<button type=\"submit\" onclick=\"this.disabled=\'disabled\';\">Submit</button> </form>
It can be user in various ways utilizing additional methods but this is just one of the simplest methods.

0

replies

Topic Search
Get Started