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.
Under 'Validate' tab of dropdown field, use this:
this.getField("Text field").value = event.value;
Replace "Text field" with name of your text field.
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.
Copy link to clipboard
Copied
Thank you Nesa! I figured it was something quite simple and that did exactly what I need. I appreciate the quick assistance.