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

Auto-Populate Field Based on Drop-Down Choices

New Here ,
Dec 13, 2023 Dec 13, 2023

The more I learn, the more I realize how very little I know.  I swear - I've read through all the auto-populate threads.  I just don't know JS well enough to fight my way out of it.  Here is what I need:

 

User chooses which Trainee applies. Options are Shift Manager, Assistant General Manager, General Manager and Above, and Franchisee.

Based on which Trainee is chosen from the drop-down menu, the field Amount is automatically filled in. Shift Manager, Assistant General Manager, and General Manager and Above have set values, but the Franchisee choice will be fillable by the user.

 

I've attached an image of the document. If this has a really simple answer to someone, you're smarter than me. Help! Thanks in advance.Screenshot 2023-12-13 at 1.50.39 PM.png

TOPICS
How to , JavaScript , PDF forms
337
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
Adobe Employee ,
Dec 14, 2023 Dec 14, 2023

Hi @Caroline301647981yv7 


Hope you are doing well and thanks for reaching out.

The workflow you are trying to achieve is might be possible using JavaScript. For more information please check the help pages listed below:
https://acrobatusers.com/tutorials/javascript_console/ 
https://helpx.adobe.com/acrobat/using/applying-actions-scripts-pdfs.html

Hope it will help

Regards
Amal

Regards
Amal
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 ,
Dec 14, 2023 Dec 14, 2023
LATEST

If you set values as export value, for dropdown choices, you can use something like this as custom calculation script of the field where you want to show value :

if(this.getField("Dropdown").valueAsString !== "Franchisee")
event.value = this.getField("Dropdown").value;

Don't give "Franchisee" any export value.

Change "Dropdown" to your actual dropdown field name.

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