Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Dropdown menu - user input - select as typing if in menu

Participant ,
Jan 14, 2016 Jan 14, 2016

I have a dropdown list box that has predefined names in it, I need this box to be both a drop down and user input field. For example if I type the letter J and Joe is in the predefined, it populates Joe - then say I hit J again it will go to the next list item that starts with J, etc. But I need the user to be able to type something that isn't predefined as well just in case their name isn't in the list.

When I tick the "Allow user to enter custom text" it doesn't populate exsisting names in the list if I start typing that name. How can I fix it so it does do that?

TOPICS
Acrobat SDK and JavaScript
719
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 14, 2016 Jan 14, 2016

The options listed when the field is created should be available by using the drop down arrow and then if needed the user should be able to add a new item by typing it in the form.

Note the changes to the user's form will carry over to other copies of the form.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 14, 2016 Jan 14, 2016

Yes, but is there any way that I can get it to recognize the predefined list (list entered when creating field) when I type so that if I am typing it will populate what you are typing if it is already in the list (think of it as if you are texting on your phone and the phone gives you a suggestion as to what you are typing)?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 15, 2016 Jan 15, 2016

@GKaiseril What if I have keystroke set up that opens the dropdown on focus and as you type it filters the list (if what you type isn't there then it just lets you enter what you are typing)?

I've found this bit of code but it is for livecycle, I need javascript since I am doing this in Acrobat XI Pro.

xfa.host.openList("Sender_Name");

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 19, 2016 Jan 19, 2016
LATEST

Can anyone assist? I currently have a regular exression limiting the users inputed text to just a-z and a char limit:

function sname(){

if (!event.willCommit) {

var value = AFMergeChange(event);

if(!value) return;

if(!AFExactMatch(/^[a-zA-Z \ ]{0,38}/, value)) event.rc = false;
    }
}

But how do I get the combo box to open the predefined list when the field is on focus? for example user tabs to field and on entering the field, the drop down automatically drops down for user to see (instead of click the down arrow on the field).

Any help at all would be greatly appreciated as I need to do this for work.

Thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines