Expand my Community achievements bar.

SOLVED

Smart drop down list

Avatar

Level 1

Drop down list - I am not even sure what should I call this functionality that I am trying to build. Basically I was wondering how can I make my drop down list smart enough to select based on more than one character.

i.e. in a drop down for Country, currently if I type "C" it will select first country starting with 'C' and if I type "A" after that it will go to first country starting with "A".

I want to be able that if user typed 'C" and 'A' it selects first country starting with CA.

Is it possible to do this in Live cycle Designer?

Thanks a lot folks

1 Accepted Solution

Avatar

Correct answer by
Level 10

When you want more than going to the item starting with the letter typed then you'll need some code.

There's an example of this sort of thing in the thread,

http://forums.adobe.com/message/2533766

Look in the change event of the Search text box.

Bruce

View solution in original post

6 Replies

Avatar

Level 10

Try checking the checkbox "Allow Custom Entry" for the dropdown.. It will sort the list based on the characters you enter..

If the characters does not match then it does not highlight any list value.

Thanks

Srini

Avatar

Correct answer by
Level 10

When you want more than going to the item starting with the letter typed then you'll need some code.

There's an example of this sort of thing in the thread,

http://forums.adobe.com/message/2533766

Look in the change event of the Search text box.

Bruce

Avatar

Level 1

Thanks Srini,

I am not looking for adding new entry in drop down list , I was looking to give users to select from list by typing more than one character. As I said in my example, for selecting Canada from list of contries user will type C and then A and drop down goes to first country starting with CA.

Avatar

Level 1

Bruce,

This is awesome, you are bang on , I just tested it in designer and it works .

Thanks a lot

Avatar

Level 1

Just one more question Bruce,

You have a text field for country names and it works showing the list, I tired to change type from Text field to type drop down list and it doesn't work.

Is there any way that we can use your code with having actual drop down list instead of a text field type?

THX,

Avatar

Level 10

I know it is a bit hacky, but I think I had trouble updating the items in the dropdown list when the list was open.

Let me know if you manage it.

Bruce