Skip to main content
Participant
September 2, 2020
Question

Need help using a button to swap field text to another field location

  • September 2, 2020
  • 1 reply
  • 472 views

I have a PDF form where I have infomration about X customer. Call it Pickup Info. I then have another set of fields below that with info about Y customer. Call it Delivery Info. I am trying to create a one click button that will take the form filled text from "Delivery Info" and replace the current text in the fields under "Pickup Info". Thus allowing a 1 click swap of this text vs manualy copying the text over.

 

Would this require java script? if so, would this be difficult to create a script for? I am not familar with Javescript, but understand the flow of Form creatation. 

 

Thanks for the help.

This topic has been closed for replies.

1 reply

BarlaeDC
Community Expert
Community Expert
September 2, 2020

HI,

 

Allowing for the names of the fields, which you would need to replace with your own the script would be something along the lines of

 

this.getField("PickUpInfoNameField").value = this.getField("DeliveryInfoNameField").value;

this.getField("PickUpInfoNextField").value = this.getField("DeliveryInfoNextField").value;

 

And so on until you have all the fields you want copied, this could just be placed on the click of the button.

 

Hope this helps

 

Malcolm