Skip to main content
Participant
1월 8, 2025 6:39 오후 UTC
해결됨

Adobe form fill - make box 0 when no other number imputed

Currently have a file that has a 'calculation'. so the customer imputs a few numbers and at the end there a 'total savings'. My issue is that the 'total savings' is 2 fields subtracted from eachother + $15. so: (field 1 - field 2)+15. When the form is completly blank with no other numbers, the field is defaulting to show $15. Any way I can remove this so the calculation doesnt work unless the rest is filled out?

PDF Automation Station
Community Expert
1월 8, 2025 7:22 오후 UTC

Use a custom calculation script:

var fld1=this.getField("field 1").value;

var fld2=this.getField("field 2").value;

if(!fld1 || !fld2)

{event.value=""}

else

{event.value=fld1 - fld2 + 15}

2 답변

PDF Automation Station
Community Expert
Community Expert
1월 8, 2025 7:22 오후 UTC

Use a custom calculation script:

var fld1=this.getField("field 1").value;

var fld2=this.getField("field 2").value;

if(!fld1 || !fld2)

{event.value=""}

else

{event.value=fld1 - fld2 + 15}

번역
gisselle5CC8작성자
Participant
1월 8, 2025 7:41 오후 UTC

thank u!!

번역