Skip to main content
Participant
July 18, 2023
Question

Custom Calculation script not working in a fillable form - suggestions please

  • July 18, 2023
  • 1 reply
  • 893 views

I have entered the script to the right to the field highlighted in blue on the left...when I populate the unit size field, nothing shows up in the rate field.  I keep staring and do not understand my mistake.  Thank you - K

This topic has been closed for replies.

1 reply

Thom Parker
Community Expert
Community Expert
July 18, 2023

If this calculation script is entered into the "RateRow1" field then it cannot reference it self as is done in this code this.getField("RateRow1").  

You say you enter a value into the Unit size field, but this field is not being referenced in the script. I think you must mean to use this code in the script. 

this.getField("Unit Size")

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
expogalAuthor
Participant
July 18, 2023

That is wonderful!  I modified my code to reflect and it worked!  So, if I may, I would also like the duplicate field "unit size on the second row to only populate if there is something in the field "extra row 1" is that possible too?  I am new to all of this and appreciate the assistance.

expogalAuthor
Participant
July 18, 2023

ok - i jumped the gun...this did not resolve my issue.  It populated once.  when I went to change the unit size it did not update the amount and when i deleted the value it did not clear the calculated field...