Forcing user to pick value from AutoComplete Box
Hi all,
I have a situation where a user is supposed to pick a value from the autocomplete filter on a form. The value is required. The issue is that the user can put anything they want in the box, whether it is in the list or not and still gets validated. There are over a thousand values to pick from, so writing in the proper regular expression is not possible.
Is there a way to force the user to actually pick a value in the list?
Ryan
-
You may add the server side validation by looping through the data source of the Auto-complete controls, and check if a selected Text on the Auto-Completed control is in the data source or not.
If not, alert a user and display the Form again.
That is what I would do.
0 -
That has been my solution too. Checking to see if what the user picked is in the domain. If not, they get an Alert and the form comes up again. This is apparently "a weak implementation" and needs a better solution. Any other ideas?
0 -
I had used a lookup table in my database to use as my drop down and used a combobox. Then used that value to query my layer. It might be tedius to make a table of thousands of options, but you only need to do this once and it's not as tedious as the data value entry in the form.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare