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

Text Boxes Unavailable Depending on Drop Down Option Selected - Adobe Acrobat Pro

New Here ,
Feb 09, 2023 Feb 09, 2023

Copy link to clipboard

Copied

Hi there, 

I have a PDF form with multiple text boxes to that are to be filled out be recepient. There is also a Drop-Down option at the top of the form. We want certain options selected on the drop down to impact the text boxes that are avaiable to fill out by the recepient. 

 

Here is the process on the form. Currently there is a drop down option for "type of work". The text boxes below are to be filled out be the recepient with the information that is needed. Currently, when a "type of work" action is selected, all options are still avaiable. We need to be able to filter when a "type of work" option is selected the text boxes that are avaialable to that specifc option. 

 

From all of my research, this needs to be done through JavaScript, is this correct?

 

Is this possible at all?

 

Thank you!

TOPICS
Edit and convert PDFs , JavaScript

Views

665

Translate

Translate

Report

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
Community Expert ,
Feb 09, 2023 Feb 09, 2023

Copy link to clipboard

Copied

As validation script of dropdown field, you can use something like this just change text field names to your actual field names (blue) and dropdown choices to your actual choices (red):

this.getField("Text1").display = event.value == "type of work" ? display.visible : display.hidden;
this.getField("Text2").display = event.value == "type of work" ? display.visible : display.hidden;

this.getField("Text3").display = event.value == "type of work 2" ? display.visible : display.hidden;
this.getField("Text4").display = event.value == "type of work 2" ? display.visible : display.hidden;

Votes

Translate

Translate

Report

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
Enthusiast ,
Feb 10, 2023 Feb 10, 2023

Copy link to clipboard

Copied

I have a similar situation. I wasn't able to make the script work. 

It would be extremely helpful if you could post a sample PDF.

Votes

Translate

Translate

Report

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
Community Expert ,
Feb 10, 2023 Feb 10, 2023

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

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
Enthusiast ,
Feb 10, 2023 Feb 10, 2023

Copy link to clipboard

Copied

LATEST

Thank you.

Votes

Translate

Translate

Report

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
Community Expert ,
Feb 09, 2023 Feb 09, 2023

Copy link to clipboard

Copied

Hi,

 

Yes this is possible and doable with Acrobat JavaScript.

 

Basically, you may employ a custom format script or custom keystroke script that executes from the dropdown menu when the user makes the desired selection.

 

You can have all textfields as readonly, for example.

 

But when the "type of work" item  is selected in the dropdown menu, the fields (that you instruct with the script) will become fillable.

 

Conversely, selecting any other item(s) from the list will make the intended textfields readonly again.

 

Is this the intended workflow?

Votes

Translate

Translate

Report

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