Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Is it possible to add FormCalc & Javascript to field?

Level 2
Level 2

Hello Adobe Fam,

Was wondering if it is possible to add Javascript & FormCalc to a field.  I had this working perfect in Adobe Acrobat but can't seem to figure out what I need to do for LiveCycle?

Have 5 dropdowns that will do a average calculation and any fields that have N/A selected I want totally out of the average and not even counted at all.  Average is working perfect but not sure how to go about getting the N/A fields out of the average calculation

I was going to try and use same javascript function I have in the Adobe Acrobat form but not sure how to do so when the calculated field is already doing the formcalc function for average?

Thanks for any help!

1 Reply
Level 2
Level 2

Yes, you can define at the event level which scripting language to use.  So, the same field can have different events like click, calculate, mouseEnter, etc. with different scripts in different languages.  If you want to do all the calculations in the 'calculate' event, you probably need to use the same scripting language.  If you are passing the field values in from somewhere else, maybe you can put in some scripting in the initialize event to strip out the 'N/A' fields before the calculate in invoked.