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

Javascript

mpachachi
Registered: Oct 1 2007
Posts: 2

I am using Acrobat 7.0, I have a form with three fields: text1, text2 and text3. Now I want to do the following: If text2 = 10 then text3 = text1 / 11 else text3 = text1 / 6

My Product Information:
Acrobat Standard 7.0.2, Windows
tedpadova
ExpertTeam
Registered: Dec 31 2005
Posts: 848
If you want the text3 field to calculate the formula try using:

var f = this.getField("text1");
var j = this.getField("text2");

if(j.value!=10)
event.value = f.value / 6;

else
event.value = f.value / 11;

ted

The author of numerous books on Acrobat, Photoshop, Illustrator and the Adobe Creative Suite, and an international speaker on Adobe Acrobat, Ted Padova is a well-known PDF guru.