Jump to content
  • 0

The issue of making the error message out


thanhvanchi
 Share

Question

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

  • 0
On 12/27/2016 at 11:12 AM, thanhvanchi said:

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.

Hi, as far as I know it's not possible to check if value is unique on the fly, you need to hit "Submit" anyway. I would recommend separating your form into 2 steps, like in this solution. First, user fills-out unique fields in submission form, then you may redirect user to update form where he can complete registration.

Link to comment
Share on other sites

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...