One of the first fields on my form needs to be unique (FieldA), and the form itself is rather long. If a user enters a value into FieldA that is not unique, they get an error message, but not until they try to submit the form.
How can I have the the error message ("Value already present") appear as soon as the user clicks out of that field - using onblur in javascript, for example - rather than waiting until the user hits the submit button? I sought out information on the internet but have not found a suitable solution to this problem. I am trying to prevent users wasting time filling out the entire form so that they are alerted of the error immediately upon entering the non-unique value.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
thanhvanchi
One of the first fields on my form needs to be unique (FieldA), and the form itself is rather long. If a user enters a value into FieldA that is not unique, they get an error message, but not until they try to submit the form.
How can I have the the error message ("Value already present") appear as soon as the user clicks out of that field - using onblur in javascript, for example - rather than waiting until the user hits the submit button? I sought out information on the internet but have not found a suitable solution to this problem. I am trying to prevent users wasting time filling out the entire form so that they are alerted of the error immediately upon entering the non-unique value.
Thanks so much for the help.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.