Expand my Community achievements bar.

Drop-down data validation

Avatar

Former Community Member
I have a subform containing several drop-downs where I want to make sure that each drop-down has a unique value i.e. the user cannot select same item in more than one drop-down.



On the exit event, I am checking for the duplicate entry and setting the focus back to the drop-down containing the duplicate so that the user is forced to correct the duplicate entry. However, if the user presses the escape key, they can move on to any field without being forced to correct the entry. How can I keep them from escaping out of the drop-down?



Thanks in advance for your comments.
2 Replies

Avatar

Former Community Member
Hi Asqfaq,

As an another solution, when an item is selected from a dropdown you can remive that item from other dropdowns to disable unintended selections. You have to put one empty selections for each dropdown, to enable no choice of selection exists for that dropdown.

Hope helps,

Asiye

Avatar

Level 1

Hi - I know this post is old, but what JavaScript code are you using to check for the duplicate entry?  I have this exact same question (just posted it) and I noticed your similar post.  I have up to five text entry fields (the form starts out with two, however a button allows the user to add up to three more lines) that a user needs to select values for (from a drop-down list) and I want to ensure that user doesn't select the same value more than once.

My post is here: http://forums.adobe.com/thread/429933?tstart=0

Thanks - any advice/suggestions would be appreciated!