Skip to main content
xaiv1225
Participant
October 26, 2022
Question

Allow text to be entered in between selected drop down option

  • October 26, 2022
  • 2 replies
  • 344 views

I have a form created in Acrobat that has js embeded. 

From a drop down option in the form, is there a way to to have a blank area of the lined text to allow user input, so they could enter a number or text word as part of the selected drop down option?

Example of a drop down option:

"EE successfully interviewed 12 or 6-month probation"

Since there are two options, 12 or 6, i wanted to just leave a blank space there and when the user chooses that option, they could also click into the space and enter the number manually.

I am not really familiar with js and just began working on this after the previous person left.

Thanks for your input.

 

This topic has been closed for replies.

2 replies

Joel Geraci
Community Expert
Community Expert
October 31, 2022

Break the question into two fields. "EE successfully interviewed with probation period" then a radio button for 6 or 12 months. The radio button only appears if the value of the first field is "EE successfully interviewed with probation period".

Thom Parker
Community Expert
Community Expert
October 26, 2022

There are some different ways this functionality can be achieved.  

1) If the dropdown is set to "Allow user to enter custom text", then they can select an item and then modify it directly in the dropdown. But this is not a good user interface technique since it does not directly ask the user to do something. 

 

2) A better technique is to isolate the selectable/entered bit so it's obvious a selection needs to be made. Make the sentence part of the page text, then, if an item in the sentence is selectable, such as the 6 or 12 month, put the dropdown at that position in the sentence. If it's entered text, put a text box at that position.

 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often