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

PLEASE HELP!!!

farouks
Registered: Jan 22 2008
Posts: 5

Hey,

I have been trying to design a form for a project at work, the only problem is I can not seem to be able to find the proper JAVA syntax for an "If then". For example If box one is checked then box two is required. Can anyone help?

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
LiveCycle Forms are programmed in either FormCalc or JavaScript, not JAVA.

The first place to start in finding the correct syntax for JavaScript is to either purchase the O'Reilly book, "JavaScript, the Definitive Guide", or another JavaScript book, or going to the Mozilla JavaScript page (http://developer.mozilla.org/en/docs/JavaScript).

For a more specific answer please provide a better description of what it is you want to do.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

farouks
Registered: Jan 22 2008
Posts: 5
Basically, what I am trying to do is this. I run the sensory program for the company in which I work, we do a periodic test of all the plants too see how they are maintaining their sensory programs, therefore there isnt a set number of panelists that will be using the form. That is why I am trying to use JAVA to make fields required if someone were to put input in the previous field. For example, someone puts their initials in field one, therefore I want the JAVA script that would make the next few fields required to be filled out.
I hope that clears it up. Can you help?

Thanks a lot.
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
What do you mean by required? Required for what?

Usually fields are "Required" for some action like submitting, saving, printing, etc.

One approach is to gray out all areas of the form that are not in use. Then activate these areas when the user performs some action like selecting a check box or filling in a field. You could put red highlights around all the fields the need to be filled in.

Reqardless, all of these approaches require some form of scripting. You can get a better idea of what you need to do by reading some of the articals on JavaScript Corner. Check out this one on graying out (disabling) fields. You can use the same technique to highlight a field.

http://www.acrobatusers.com/tutorials/2007/js_disabling_fields/

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

scottsheck
Registered: May 3 2007
Posts: 138
Farouks, 'Java' and Javascript' are both, two different computer languages that exist, with completely different syntax and purpose, so thomp's clarifying is very valid. You can't use the terms loosely.