Quantcast
Channel: Adobe Community: Message List - PDF Forms
Viewing all articles
Browse latest Browse all 57214

Re: Inserting a 'difficult' formula in PDF

$
0
0

You didn't specify the field names... Let's say they're called VoltInfo1 to VoltInfo4. In that case, you can use this code as the custom calculation script of the field that should hold the result:

 

var v1 = Number(this.getField("VoltInfo1").value);

var v2 = Number(this.getField("VoltInfo2").value);

var v3 = Number(this.getField("VoltInfo3").value);

var v4 = Number(this.getField("VoltInfo4").value);

event.value = ((v1*v2)+(v3*v4))*1.25;

 

I was unclear whether the final multiplication should be applied to the result of the sum or not, so you might need to edit the parentheses to make it work properly...


Viewing all articles
Browse latest Browse all 57214

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>