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

Display predifined text based on selection from a dropdown menu

Community Beginner ,
Nov 10, 2021 Nov 10, 2021

Hi all,

 

I have created a PDF form via Adobe Acrobat Pro DC (Version 2021.007.20099). However, on a dropdown menu I have 7 items. Is it possible to display some predefined text based on the selection the end user selected.

E.G. The dropdown includes the following items:

Town
Parish

If either of these are selected, I would like an information text box displayed with further instructions. Otherwise the text should remain hidden.
Ideally the information would differ based on the selection, however I can work around this if not possible.

Is what I am trying to achieve possible and if so, can you please guide me to how/where I can do this.

Thank in advance

TOPICS
Create PDFs , How to , PDF forms
5.3K
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
1 ACCEPTED SOLUTION
Community Expert ,
Nov 10, 2021 Nov 10, 2021

As validation script of dropdown field use this and change text field name to your actual field name:

var f = this.getField("Textfield");
if(event.value == "Town")
f.value = "Your text goes here";
else if(event.value == "Parish")
f.value = "Your text goes here";
else f.value = "";

 

Also in dropdown field properties -> options tab tick 'Commit selected value immediately'.

View solution in original post

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
Community Expert ,
Nov 10, 2021 Nov 10, 2021

As validation script of dropdown field use this and change text field name to your actual field name:

var f = this.getField("Textfield");
if(event.value == "Town")
f.value = "Your text goes here";
else if(event.value == "Parish")
f.value = "Your text goes here";
else f.value = "";

 

Also in dropdown field properties -> options tab tick 'Commit selected value immediately'.

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
Community Beginner ,
Nov 10, 2021 Nov 10, 2021

Hi Nesa,

Thank you so much for your assistance. I have made the text box read only and it works perfectly 🙂

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
New Here ,
Jun 03, 2024 Jun 03, 2024
LATEST

Hi Nesa, great answer! I would like to build on your solution and include multiple dropdown values in generating the text.

 

My dropdown values are, 

Type, - (This will drive the standard language definition template selection) 

 

Frequency,

Date, 

Target

The final defition field.

 

There are 4 standard definition template options and the dropdown values will not correlate so I the 3 selected values to populate within the selected standard definition template. 

 

If you could assist me with the general command and place holders, I can format the specific values. 

 

Thank you!

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