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

Mirror Combobox Value to Another Field

New Here ,
Oct 11, 2023 Oct 11, 2023

Copy link to clipboard

Copied

I have what must be the simplest question, but I can't find the answer despite over an hour of searching and many uneducated attempts to pretend I understand how to piece together a basic script. I have about zero Acrobat experience beyond the most basic things. Every search I've done for this leads me to ways to select from a dropdown and copy some other related value to another field which is more complicated than I need. I am making a PDF form and simply need to mirror the selection of a combobox into a second field which could be another combobox, a text field, or anything else that would work. The combobox does allow custom text as well, so hard coding the values to mirror wouldn't work.

 

If "123" is selected in the combobox, fill in other field with "123." If "456" is selected, fill the other field in with "456". If "XYZ" is typed in, fill the other field with "XYZ."

 

I can get straight text fields to mirror the contents of another field by naming them the same thing, but comboboxes give me an error when I give them the same names.

 

Thanks in advance for any help anyone can give.

TOPICS
Create PDFs , How to , JavaScript , Modern Acrobat , PDF forms

Views

472

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

correct answers 1 Correct answer

Community Expert , Oct 11, 2023 Oct 11, 2023

Under 'Validate' tab of dropdown field, use this:

this.getField("Text field").value = event.value;

Replace "Text field" with name of your text field.

 

Votes

Translate

Translate
Community Expert ,
Oct 11, 2023 Oct 11, 2023

Copy link to clipboard

Copied

Under 'Validate' tab of dropdown field, use this:

this.getField("Text field").value = event.value;

Replace "Text field" with name of your text field.

 

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
New Here ,
Oct 11, 2023 Oct 11, 2023

Copy link to clipboard

Copied

LATEST

Thank you Nesa! I figured it was something quite simple and that did exactly what I need. I appreciate the quick assistance. 

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