Copy link to clipboard
Copied
I use Acrobat Pro DC 18
I have a text field that show the last 3 digits of a select field value (using custom script).
The problem is that it only shows up the 3 digits when the cursor of the mouse is inside the text field. When it's outside, the value is not updated.
If I changed the select box value, the value is correct in the text field.
I fill out the pdf with PDFTK, I added this javascript when opening document so the calculations are triggered :
this.calculateNow();this.calculateNow();
Other fields work just fine. In another field I sum up this value and other fields value and the total is correct. Only the display is not correct for this field.
1. Cursor outside : value is not correct
2. Cursor inside : value is correct

3. Cursor outside : value is not correct
4. Changing value : value is correct :
It works on google chrome pdf viewer. :
Why the display value is not the same as its value ?
Copy link to clipboard
Copied
Without seeing the file it's very hard to say what's causing this issue.
Can you share the file with us (via Dropbox, Google Drive, Adobe Cloud, etc.)?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
There are multiple errors in your JS code. Check the JS Console.
Copy link to clipboard
Copied
I enabled JS console on startup and enabled "Show console on errors and messages" but I don't get any errors as far as I know :
I am not really familiar with debugging JS inside Acrobat. How do I get to see the errors you are talking about ?
Copy link to clipboard
Copied
Change the value of one of the drop-downs...
Copy link to clipboard
Copied
I don't see any error.
Copy link to clipboard
Copied
You have to exit the field after changing the value for it to be committed.
Copy link to clipboard
Copied
No error is showing up when changing the value of dropdown and exiting the field.
Copy link to clipboard
Copied
The error messages I'm seeing are for the trim method. This method was introduced in a relatively late version of ECMAScript, so it's possible my version of Acrobat doesn't support it, while your does.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more