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

How do I create conditional fields?

New Here ,
Sep 13, 2022 Sep 13, 2022

Copy link to clipboard

Copied

My goal is to create a document that allows clients to answer questions and depending on their answers either open or show new fields based on their answers. Hoping someone can point me in the right direction to start learning how to make this possible.

 

Example:

Q: What do you like to drink?

  • Water
  • Soda
  • Other

 

If soda or other is selected. a new field is either unlocked or appears (depending on adobes capability).

 

Enter your preferred drink:

[Client enters choice here]

 

I've seen some sources that deal with numbers, but not based on client response. Unless I haven't used the right terms to properly search.  Any insight is appreciated.

 

TOPICS
Create PDFs , Edit and convert PDFs , General troubleshooting , JavaScript , PDF forms

Views

118

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 ,
Sep 13, 2022 Sep 13, 2022

Copy link to clipboard

Copied

LATEST

You can either unlock/lock (read-only) or show/hide fields in acrobat.

I would use script as 'Validation' in first field where you choose drink, let's say you have 3 fields named "Water","Soda","Other" and you want to show/hide depend on answer in first field:

 

this.getField("Water").display = event.value == "Water" ? display.visible : display.hidden;
this.getField("Soda").display = event.value == "Soda" ? display.visible : display.hidden;
this.getField("Other").display = event.value == "Other" ? 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