Skip to main content
Participating Frequently
March 16, 2020
Answered

Replicate text field content in another text field

  • March 16, 2020
  • 2 replies
  • 2765 views

Hi

I was trying to configure a text field so that the content the user types is replicated in another text field in another part of the document- any ideas would be massivley appreciated

 

Thanks

 

Scott

This topic has been closed for replies.
Correct answer ProlificUser

I am assuming you are trying to prepare a form? If yes, when you choose the text field, keep the text field names same for both. Right click on the text field boxes and select properties and change name to do that. So when the user types something on the text field 1, the same is copied into text field 2. 

Hope that helps. 

2 replies

Thom Parker
Community Expert
Community Expert
March 16, 2020

Fields that have the same name, are essentially the same field, so they share the same value.

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
ProlificUserCorrect answer
Participating Frequently
March 16, 2020

I am assuming you are trying to prepare a form? If yes, when you choose the text field, keep the text field names same for both. Right click on the text field boxes and select properties and change name to do that. So when the user types something on the text field 1, the same is copied into text field 2. 

Hope that helps. 

Participant
August 24, 2023

I am trying to do the same thing. I want to copy same value from and entered field response, but the problem I keep running into is for example I only want that value to show if a checkbox is marked in that certain location. However I have 4 different checkboxes. So fx (if checkbox"a" is checked show the value, if checkbox b is checked show the value ect. I also have the Checkboxes to automatically be checked if it reflects the subject of the attached document.

 

Thom Parker
Community Expert
Community Expert
August 24, 2023

In this case give the field that will be getting copied value a unique field name and then use a calculation script to perform the conditional copy. 

Read these articles:

https://www.pdfscripting.com/public/How-to-write-an-If-statement.cfm

https://www.pdfscripting.com/public/How-to-Write-a-Basic-PDF-Calculation-Script.cfm

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often