Copy link to clipboard
Copied
I was tasked to rename some textfields, checkboxes, radio buttons and dropdown fields in a working Fillable form. The only thing I did was to add prefixes to the original name and update the javascript codes of fields (replace old field names with new ones).
I got a feedback saying that only a few of the calculations work and majority isn't working anymore.
I didn't create this form and haven't used it even once. How do I identify what went wrong and what fields to look at?
Thank you in advance.
Go to Tools - JavaScript - Edit All JavaScripts and search for the old field names that you see in the error messages. That will let you know where there are located, but DO NOT edit them there. Close that window and edit the code directly from the fields themselves. In the future it will be easier if you placed all the code inside functions in a doc-level script, as then you would be able to search and edit it at the same time.
Copy link to clipboard
Copied
First step is to get more information. "It doesn't work" can mean many different things. Ask for exact details.
Also, ask in what application they are viewing the file and exactly what they did when it "didn't work", including screenshots, if possible.
Copy link to clipboard
Copied
They are using an iPad, PDF Expert app.
So I tried the Ctrl+J and these errors appeared,
Acrobat EScript Built-in Functions Version 11.0
Acrobat SOAP 11.0
TypeError: getField("txt_DB_CFA") is null
1:Field:Calculate
TypeError: getField("txt_DB_CFA") is null
1:Field:Calculate
TypeError: getField("txt_DB_CFA") is null
1:Field:Calculate
TypeError: getField("c_DB_PerSystem1") is null
2:Field:Calculate
TypeError: getField("c_DB_PerSystem2") is null
2:Field:Calculate
TypeError: getField("c_DB_PerSystem3") is null
2:Field:Calculate
TypeError: getField("c_DB_PerSystem1") is null
2:Field:Calculate
TypeError: getField("c_DB_PerSystem2") is null
2:Field:Calculate
TypeError: getField("c_DB_PerSystem3") is null
2:Field:Calculate
TypeError: this.getField("c_DB_PerSystem1") is null
2:Field:Calculate
TypeError: this.getField("c_DB_PerSystem2") is null
2:Field:Calculate
TypeError: this.getField("c_DB_PerSystem3") is null
2:Field:Calculate
InvalidSetError: Set not possible, invalid or unknown.
Field.value:8:Field c_ACH50:Calculate
I already renamed the txt_DB_CFA field to c_DB_CFA so I am not sure why that is still appearing in the error.
Any idea on how to fix these errors?
Copy link to clipboard
Copied
When you change the name of a field you must also change the Javascript code.
Copy link to clipboard
Copied
Yes, I changed the Javascript codes as well. I may have missed some since there are plenty of fields. Is there a way to know the specific fields that causes the error or I have to do it manually?
Copy link to clipboard
Copied
Go to Tools - JavaScript - Edit All JavaScripts and search for the old field names that you see in the error messages. That will let you know where there are located, but DO NOT edit them there. Close that window and edit the code directly from the fields themselves. In the future it will be easier if you placed all the code inside functions in a doc-level script, as then you would be able to search and edit it at the same time.
Copy link to clipboard
Copied
Thanks. I see all the codes now. This is my first time identifying specific fields, how do I do that? Do I look at the Ln # and Col #?
Copy link to clipboard
Copied
Look at "belongs to:".
Copy link to clipboard
Copied
Thank you.
Copy link to clipboard
Copied
Search for the specific field names listed in the error report. It helps to edit the code in a different plain text editor.
Copy link to clipboard
Copied
I did this too. Thanks
Copy link to clipboard
Copied
Thank you again for your help.