Copy link to clipboard
Copied
I have a form fillable PDF that has 5 amount fields a user needs to enter. They are each formatted as dollar amounts. I have a 6th amount field that is read only that calculates the sum of those 5 fields and is also formated as dollar amount. An amount is entered in field 1. When an amount is entered in field 2, the amount in field 1 goes away, and so on with the remaining fields.
I have verified all fields numerous times. There is no other validations or calcuations on any of these fields. What am I missing?
Thanks!
Copy link to clipboard
Copied
Have you check the console for errors? I see from a previous post you only have Standard. To open the console in Standard create a button with the following Mouse Up action:
console.show();
Copy link to clipboard
Copied
Can you share your file?
Copy link to clipboard
Copied
Unfortunately I cannot due to sensitive information already on the document.
Copy link to clipboard
Copied
In that case you can check 'All JavaScript' to see if there are any script that affect those fields.
Copy link to clipboard
Copied
how do I do that? (newbie, here...)
Copy link to clipboard
Copied
In the Tools search type "JavaScript" then select All JavaScripts
Copy link to clipboard
Copied
Apparently, I only have a standard license. I do not have the JavaScript tool
Copy link to clipboard
Copied
Are there calculations in other fields besides the ones listed?
Copy link to clipboard
Copied
Yes there is. It is a lot so I'll try to step it all out.
Page 1 contains a drop down for additional fundings ("--", "1", "2", "3", "4"). If any number is selected, I spawn page 2.
Action > On Blur > Run Javascript:
if(event.value != "--")
this.getTemplate("ExtraFunding").spawn(this.numPages,false,false);
else if(this.numPages>0)this.deletePages(1,this.numPages-1);
Then, based on the number of fundings selected, I populate blocks of text fields on Page 2.
Validate > Run custom validation script:
if (event.value == "--") {
this.getField("FundingType2").value = ""
this.getField("FundingType3").value = ""
this.getField("FundingType4").value = ""
this.getField("FundingType5").value = ""
} if (event.value == "1") {
this.getField("FundingType2").value = "Funding Type 2:"
this.getField("FundingType3").value = ""
this.getField("FundingType4").value = ""
this.getField("FundingType5").value = ""
} if (event.value == "2") {
this.getField("FundingType2").value = "Funding Type 2:"
this.getField("FundingType3").value = "Funding Type 3:"
this.getField("FundingType4").value = ""
this.getField("FundingType5").value = ""
} if (event.value == "3") {
this.getField("FundingType2").value = "Funding Type 2:"
this.getField("FundingType3").value = "Funding Type 3:"
this.getField("FundingType4").value = "Funding Type 4:"
this.getField("FundingType5").value = ""
} if (event.value == "4") {
this.getField("FundingType2").value = "Funding Type 2:"
this.getField("FundingType3").value = "Funding Type 3:"
this.getField("FundingType4").value = "Funding Type 4:"
this.getField("FundingType5").value = "Funding Type 5:"
}
Using "FundingType2" field for example here, on Page 2 in this field I have another validation script to display a drop down called "FundingType2a"
if (event.value == "Funding Type 2:") {
this.getField("FundingType2a").display = display.visible;
}if (event.value == "") {
this.getField("FundingType2a").display = display.hidden;
}
On the dropdown field "FundingType2a" it defaults to "- Select -" but if any of the other options are selected, it opens up additional fields here and makes them visible. This script contains sensitive information so I'll only put in the first dropdown option and replace sensitive data with 'XXXX'. Note, my issue occurs regardless which option is selected. It is only on a field formated for Amount ("Amount2"), the issue does not occur with any other field that needs to be filled in.
var dropdownValue = this.getField("FundingType2a").value;
switch(dropdownValue) {
case "XXXX":
this.getField("AmountType2").value = "XXXX"
this.getField("Amount2").display = display.visible;
this.getField("Credit12a").value = "XXXX"
this.getField("Credit22a").value = "XXXX"
this.getField("Credit22c").value = ""
this.getField("Credit32a").value = "XXXX"
this.getField("Credit42a").value = "XXXX"
this.getField("Credit42c").value = "XXXX"
this.getField("Credit52a").value = "XXXX"
this.getField("Credit52c").value = ""
this.getField("Credit52d").display = display.hidden;
this.getField("Notes2a").value = "XXXX"
this.getField("Notes2b").display = display.visible;
break;
This issue is with the "Amount" field in the additional fundings only. The field settings are as follows:
General > Form Field: Hidden, not Read Only, not Required
Options > no boxes are checked
Actions > no actions are configured
Format > Number, Decimal Places: 2
Validate > none
Calculate > none
I've reviewed all other validations and calculations and these are the only ones associated with or mention "Amount2".
Any help is greatly appreciated as I have never written JavaScript before.
Copy link to clipboard
Copied
Have you check the console for errors? I see from a previous post you only have Standard. To open the console in Standard create a button with the following Mouse Up action:
console.show();
Copy link to clipboard
Copied
WOW! THANK YOU!! That showed me exactly where the issue was! I'm kicking myself for not posting this sooner as I spent HOURS reviewing every single script. I did a lot of copy & paste of scripts throughout and I missed a line where I had to change the field name. Again, THANK YOU!