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

Checkbox state with FormCalc

pmichelazzo
Registered: Jul 23 2007
Posts: 4

Dear colleagues,

This is my first post on the net about FormCalc. I'm a web developer for many years but at now, I need to make some forms using Acrobat.

My first question is: I have a form with some fields that I need to make an avg operation but, before, I need to check if some checkbox is clicked. My problem is "how can I know the status of a checkbox"? Using JavaScript I know how can I do it but I would like to make using FormCalc.

A little bit of my tests:

if(CheckPractical<>null) then
avg(TheoricalValue1,PracticalValue1*2)
else
sum(TheoricalValue1,PracticalValue1)
endif

If I run this script, I receive an error on the CheckPractical element. Someone can help me with this issue?

Thanks a lot

Best regards,
Paulino Michelazzo

PS: I'm using Acrobat Profesisonal 7 with Adobe Designer over Windows

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
Just check if the value of the check box, CheckPractical, is equal to export value, 1.

if(CheckPractical EQ 1) then
avg(TheoricalValue1,PracticalValue1*2)
else
sum(TheoricalValue1,PracticalValue1)
endif

George Kaiser

pmichelazzo
Registered: Jul 23 2007
Posts: 4
Oh, great! It's working

Thanks a lot

Best regards