Skip to main content
Participant
July 3, 2023
Answered

Adobe PDF Form - show form field based on dropdown selection

  • July 3, 2023
  • 1 reply
  • 892 views

Good morning,

 

I have a multi-page document that I am trying to condense. 

 

In one section, we have Course Selection with the following fields:

Course name (drop down)

Start date (date)

Campus (select one of two tick boxes)

Length (type in length of weeks)

 

For one of the courses (Private Lessons), in addition to length (weeks), we will also need total number of hours they would like to enrol. The other courses do not have the option for hours so I only want this to show if they select Private Lessons from the drop down menu. 

 

Is this possible? 

 

Thank you.

This topic has been closed for replies.
Correct answer Nesa Nurani

You can use this as 'Validate' script of dropdown:

this.getField("Hours").display = event.value == "Private Lessons" ? display.visible : display.hidden;

 

Change "Hours" to your actual field name.

1 reply

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
July 3, 2023

You can use this as 'Validate' script of dropdown:

this.getField("Hours").display = event.value == "Private Lessons" ? display.visible : display.hidden;

 

Change "Hours" to your actual field name.

BROWNSAuthor
Participant
July 4, 2023

Wonderful. It works well. Thank you for your time, Nesa. Much appreciated.