Hi all,
This is my first topic I posted.
I have developed a form for a school and I'm not familiar with javascript. Via this website, I discovered about LifeCycle Designer.
The problem is that I already developed a form in Acrobat where I think it would be easier to add FormCalc in LiveCycle Designer. I have attempted to import the form into LiveCycle Designer, but it keeps crashing.
Here's the Excel formula to count ONLY the numbers so it will be reflected if the teacher or student is absent, we use "AB" in drop down list with a scale from 1 to 4 so
=(COUNT(C31:C34,C25:C28,C19:C22,C13:C16,C7:C10))*4
How do I use the javascript to count the numbers only on the form fields?
Second thing is for percentage
=AVERAGE(H36/H38)
I have to admit that it's a lot of work to figure out LiveCycle application. I cannot manage to create a simple SUM command while I can do it in Acrobat.
I appreciate your help and it's clear that I'm an novice.
When writing scripts that deal with multiple fields in the same way, for example all the fields in a column in a table, naming is very important. The JavaScript code has to be able to automatically generate the names of the fields it needs to work on.
So if the fields in a column are named "Count1" thru "Count9". You could write a script for an AcroForm (i.e. an Acrobat Form) to count up all the fields that contain valid numbers like this.
The function "isNaN()" is a Core JavaScript function that determines if a particular value is numeric.
If you were doing this on a LiveCycle form the concept would be the same. The only difference would be in how the form field values are acquired.
JavaScript is simple as far as programming languages go, but it's still a programming language, and Acrobat provides a forms technology, not a spreadsheet technology, the operational concepts are very different. To do this effectively you don't need to be an expert, but you do need understand some of the underlying concepts in designing and programming forms in Acrobat and LiveCycle.
You can find tutorials and other info on this spcific topic, here at this web site (www.acrobatusers.com). Look at the Tutorials section. And even better info on scripting at www.pdfscripting.com. This is a membership web site, but there are some free videos that will give you the basics. Check it out.
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script