Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Why does an amount field clear out when another amount field value is entered?

New Here ,
Feb 05, 2025 Feb 05, 2025

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!

TOPICS
Create PDFs , General troubleshooting , PDF , PDF forms
374
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Feb 07, 2025 Feb 07, 2025

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();

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 05, 2025 Feb 05, 2025

Can you share your file?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 07, 2025 Feb 07, 2025

Unfortunately I cannot due to sensitive information already on the document.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 07, 2025 Feb 07, 2025

In that case you can check 'All JavaScript' to see if there are any script that affect those fields.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 07, 2025 Feb 07, 2025

how do I do that?  (newbie, here...)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 07, 2025 Feb 07, 2025

In the Tools search type "JavaScript" then select All JavaScripts

PDFAutomationStation_0-1738939865632.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 07, 2025 Feb 07, 2025

Apparently, I only have a standard license.  I do not have the JavaScript tool

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 05, 2025 Feb 05, 2025

Are there calculations in other fields besides the ones listed?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 07, 2025 Feb 07, 2025

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.

 

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 07, 2025 Feb 07, 2025

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();

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 07, 2025 Feb 07, 2025
LATEST

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! 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines