Skip to main content
Participant
August 14, 2019
Question

Copy Field Contents to another field with if statement.

  • August 14, 2019
  • 1 reply
  • 678 views

I have a Button that on click populates a Package one of the the JS that I am using is causing me headaches though.

I have an if statement that checks if a radio button value then depending on the value is supposed to copy the value of a hidden field containing multiple lines of text to another field.  Unfortunately the button click sets the value of the Field to object Field.

if (this.getField("Pac.Comp").value == "DMV") {

this.getField("Form.PG5Remarks2").value = this.getField("PG5StatementFem").value};

Form.PG5Remarks  has the "object Field" instead of the statement.

Thanks for any assistance.

This topic has been closed for replies.

1 reply

Bernd Alheit
Community Expert
Community Expert
August 14, 2019

What does you get when you execute following in the console?

this.getField("PG5StatementFem").value;

Participant
August 14, 2019

I am not using a console.  And don't have the permissions to install one.

try67
Community Expert
Community Expert
August 14, 2019

There's nothing to install. It's a built-in feature of Acrobat. Press Ctrl+J to open it.