Skip to main content
Known Participant
April 17, 2023
Question

How to jump to combo box selection when keying in multiple characters (not just first character)

  • April 17, 2023
  • 2 replies
  • 1419 views

I have a PDF combo box with a list of over 300 different locations, beginning with location numbers. I have a script in Custom Calculation to allow the combo box to be editable (see below). Still, when you begin typing in a location number, it only searches by a single digit matching the first digit of a selection. For instance, if I want to find location 803, typing in "803" only brings up the first instance starting with a "3" since it was the last digit entered. If you key in "3" multiple times, it jumps through the selections starting with "3." I would like to script it to jump to whatever I fully key in, such as "803." I would especially like it to jump to the location name if that is keyed in, though the listing does not start with names. Any suggestions or sample scripts would be helpful.

this.getField("ddlUnitType.1").editable = true;
This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
April 17, 2023

This is not possible with a script. The closest you can get to it is to filter the items in the list, based on the value of a separate text field, for example.

Nesa Nurani
Community Expert
Community Expert
April 17, 2023

You don't need script to allow users to enter custom text,

there is an option in field properties you can check that will allow that:

 

Can you share your file, so we can test the dropdown field?

 

CeltexanAuthor
Known Participant
April 17, 2023

Hello Nesa,

I use a script rather than selecting it in Properties > Options, so I do not have to keep resetting it each time I export it from InDesign using FormMaker Pro. FormMaker Pro allows me to set properties as if I were in Acrobat, except it does not have the Options tab, keeping it all in the InDesign file.
I have attached the file for you to view. The field I am referring to is the Charge to location dropdown.