Need PDF script that will add and multiply text boxes together
I know very little about scripts so please bear with me. First I'll explain what I did and then explain how I need to modify what I did to do something slightly different.
I originally wanted a text box ("ACRO_St") to display the value of a second text box ("Dex_B") automatically, but when a checkbox called "ACRO" was checked, ACRO_St would then display the value of Dex_B plus the value of a third text box called "Prof_B" (and I wanted a plus sign in front of the final value). Knowing zero about scripting but reading the help provided by forum users to others, I was able to accomplish what I wanted with the following script:
if (getField("ACRO").value=="Yes")
event.value = getField("Dex_B").value+getField("Prof_B").value;
else event.value = getField("Dex_B").value
if (event.value>0){var cr ="+"}else{var cr=""}AFNumber_Format(0,0,0,0,cr,true)
Now I want to modify this script so that, while continuing to do what it already does, if I then check a second checkbox called ("ACRO_Ex"), the text in "ACRO_St" would add the value of Dex_B with twice the value of Prof_B (i.e, Dex_B + (Prof_B x 2)). Any help in doing this from the geniuses in this community would be amazing.
