1 Reply Latest reply on Sep 10, 2013 11:37 AM by Thomas_Chongruk

    Is it possible to add FormCalc & Javascript to field?

    41globalit

      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?

       

      http://41global.com/performeval.pdf

      Thanks for any help!

        • 1. Re: Is it possible to add FormCalc & Javascript to field?
          Thomas_Chongruk

          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.