Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Execution

Status
Not open for further replies.

vbfvr10

Technical User
Dec 20, 2012
2
US
Hi Everyone,
I have been working on a fill-able form in Adobe Acrobat Pro 11. A field in the form needs to execute a formula if a certain box has been checked. I was able to enter a simple formula which works but it's not conditional on the check box. I have been unable to create this script and need some help. I'm at a loss on how to do the rest. I would like the formula to work something like this If the box 1 is checked then box 2 should be multiplied by .80. If box 1 is not checked than box 2 should be 0.

Can anyone help? I'm very new to Java Script and going nuts trying to figure this out.

Thanks.
 
assume the checkbox to be testing is called myField1.
the other field is called myField2
and the results field is called myField3
Code:
[b][COLOR=#0000FF]this[/color][/b][COLOR=#990000].[/color][b][COLOR=#000000]getField[/color][/b][COLOR=#990000]([/color][COLOR=#FF0000]"myField3"[/color][COLOR=#990000]).[/color]value [COLOR=#990000]=[/color] [b][COLOR=#0000FF]this[/color][/b][COLOR=#990000].[/color][b][COLOR=#000000]getField[/color][/b][COLOR=#990000]([/color][COLOR=#FF0000]"myField1"[/color][COLOR=#990000]).[/color]value[COLOR=#990000];[/color] [COLOR=#990000]==[/color] [COLOR=#FF0000]"On"[/color] [COLOR=#990000]?[/color] [b][COLOR=#0000FF]this[/color][/b][COLOR=#990000].[/color][b][COLOR=#000000]getField[/color][/b][COLOR=#990000]([/color][COLOR=#FF0000]"myField2"[/color][COLOR=#990000]).[/color]value [COLOR=#990000]*[/color] [COLOR=#993399]0.8[/color] [COLOR=#990000]:[/color] [COLOR=#993399]0[/color][COLOR=#990000];[/color]
 
use radio(option) buttons

Never knock on Death's door: ring the bell and run away! Death really hates that!
 
Thank you! I will give this a try. Much appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top