Skip to main content
Known Participant
November 25, 2020
Answered

Looking for help on how to make text in PDF be able to be sent from one field to another

  • November 25, 2020
  • 2 replies
  • 2171 views

Basically like the subject says. I'm trying to create a form for trainers in my job. I'm looking specifically for a way for my trainers to look at a list of training items in one field and for them to be able to click on that item ( for example item 10.2) and it will show up in a different field that shows they trained on that item.

This topic has been closed for replies.
Correct answer try67

Yes it does have that option selected


OK, then you can use this code as the custom calculation script of the text field (I've assumed the name of the list box field is "List1"):

 

var v = this.getField("List1").value;

if (typeof v=="object") event.value = v.join(", ");

else event.value = v;

2 replies

Thom Parker
Community Expert
Community Expert
December 1, 2020
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
ls_rbls
Community Expert
Community Expert
November 25, 2020

You need to be more specific about the workflow that you're trying to achieve.

 

So far,  I understand that you want to implement a combobox, or dropdown menu, with a list of items to pick from. And based on a selection that is made on that dropdown field,  another field in the same PDF will populate with with additional data... This can be achieved with javascript scripting.

 

But my question is: where is the information that shows what item they've trained on gathered from? Another textfield? a combination of other filled-in textfields?

Mike5DC4Author
Known Participant
November 25, 2020

Sorry about not being specific enough, I just started working with PDF so I will try to better explain. In my PDF I have a drop down labeled "Position STS Items" that when I select an option automatically populates all training STS items in a text box labeled "STS Items" below. I did that using a Java script code that I found in these forums. What my goal is: I have a text box to the right of "STS Items" labeled "STS Items Covered During Eval Period". I would like to be able to click on a single STS item in "STS Items" and have it move over to "STS Items Covered During Eval Period". I got the idea from my Pixel 3xls keep notes app. Where when I have a grocery list I can click on bananas when I get bananas and it will move the grocery item down to show I already got them. I hope this helps!

try67
Community Expert
Community Expert
November 25, 2020

Do you mean that the current selection only should be shown in the text field, or that each time you select a value in the drop-down it should be added to the text field's current value?