Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
What does you get when you execute following in the console?
this.getField("PG5StatementFem").value;
Copy link to clipboard
Copied
I am not using a console. And don't have the permissions to install one.
Copy link to clipboard
Copied
There's nothing to install. It's a built-in feature of Acrobat. Press Ctrl+J to open it.
Copy link to clipboard
Copied
It's pretty much impossible to fix JavaScript code without looking in the console, because that's where all the error messages come.
Copy link to clipboard
Copied
If you do not want to use the built-in console, then you need to add more JavaScript code to display the massage. JavaScript includes the "try { ....} catch (error) {...} " statements to trap and handle error exceptions. Other things you could try include using the "open consonle();" statdement in your script or changing your copy of Acrobat's Preference to open the console on error.
Copy link to clipboard
Copied
It's:
console.open();
Not:
open console();
Copy link to clipboard
Copied
Sorry, it's actually:
console.show();