Skip to main content
Known Participant
July 29, 2024
Answered

Checkbox to copy information and populate on an additional page

  • July 29, 2024
  • 1 reply
  • 2188 views

I am trying to find out how I can have information inputted on one page copied and populated on to another page based on a selection made along with the information. I cannot just title the text boxes the same, because I don't want them all to copy automatically. For example, an account number to be included on one page based on the product selected, but another account number not included on that additional page because the product is not selected for that one. Thank you for any help that can be provided.

This topic has been closed for replies.
Correct answer PDF Automation Station

This is the complete code I'm trying to make work if any of the options are chosen.

if(this.getField("1 User ACH.0").value=="Input"); value=="Approve"); value=="Both")
{
event.value=this.getField("ACCT NUMBERRow1q").value;
}
else
{
event.value="";
}

But also, I have copied the first code that does work with the "Input" option selected, but it does not work when I apply it to more than one field updating the field names...

 


You can't code it like that.  You need to use || which means or.

 

var output=this.getField("1 User ACH.0").value;
if(output=="Input" || output=="Approve" || output=="Both")
{
event.value=this.getField("ACCT NUMBERRow1q").value;
}
else
{
event.value="";
}

1 reply

PDF Automation Station
Community Expert
Community Expert
July 29, 2024

How is the selection made, drodown field?  Check boxes?  For check boxes, make the export values the account numbers then enter the following custom calculation script in the field:

if(this.getField("Checkbox 1").value=="Off")

{event.value=""}

else

{event.value=this.getField("Checkbox 1").value}

 

For a dropdown enter this custom calculation script:

event.value=this.getField("Dropdown 1").value;

Known Participant
July 29, 2024

Thank you this is helpful. However, the account numbers are inputted by the user of the document and will vary by user. I have a dropdown that they select 'yes' or 'no'. When 'yes' is selected it would need to populate to the corresponding page.

PDF Automation Station
Community Expert
Community Expert
July 30, 2024

 

if(this.getField("Dropdown").value=="Yes")
{
event.value=this.getField("Account Number").value;
}
else
{
event.value="";
}