These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Calculation script help!

olaideddoc
Registered: Jul 17 2010
Posts: 1

Hello everyone,

I'm a newbie creating a pdf form.

I need the exact script for a complex formula to input into the custom calculation script box in acrobat.

Dobois BSA formula 0.007184 * (height ^ 0.725 * weight ^ 0.425)
I have height and weight in separate fields.

Thanks

My Product Information:
Acrobat Pro Extended 9.3.1, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
var height = this.getField("height").value;var weight = this.getField("weight").value;if (height!=null && height!="" && weight!=null && weight!="") {event.value = 0.007184 * (Math.pow(height, 0.725) * Math.pow(weight , 0.425));} else event.value = "";

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
You might want to look at [url=http://www.acrobatusers.com/tutorials/2006/form_calculations]How to do (not so simple) form calculations[/url] by Thom Parker and [url=https://developer.mozilla.org/En/JavaScript]Mozilla Developer JavaScript[/url] for JavaScirpt reference. Also the O'Rielly book on JavaScirpt could be helpful.

George Kaiser