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

Different Subforms displayed dependnt on selection from Drop Down menu

AlScott
Registered: Nov 2 2007
Posts: 123

Well,
I've managed to get the correct subforms to display/hide when I choose the first item from a DROP DOWN menu.
(Thanks to Thomp and ssubquark!!)
But now I've run into a another problem.
As I described earlier there are several different options for this form:
New Installation
Broken Seal
EPROM Replace
...
The form itself is broken down into 9 subforms.
So - a New Installation might requires sections 1,4,5,6,7,8 to be visible, but 2 & 3 invisible (ie not necessary to complete.

and a Broken Seal needs only 1,3,5,6 & 8 - again the other subforms to be 'invisible'

Here's the java:
if (form1.ClassIIIncidentReportForm.ClassIIReportFormTotal.ClassIIReportTitle.ServicePerformed.xfa.event.change == "New Installation") then
ClassIISection1.presence = "invisible";
ClassIISection3.presence = "invisible";
ClassIISection2.presence = "visible";
ClassIISection4.presence = "visible";
ClassIISection5.presence = "visible";
ClassIISection6.presence = "visible";
ClassIISection7.presence = "visible";
ClassIISection8.presence = "visible";
ClassIISection9.presence = "visible";
}

That much works fine!

Now if the User selects: Broken Seal a different set of subforms will be displayed.

If I try to use an 'endif' or 'else' type command to append this next group nothing happens at all.

FormCalc reference from the 'helpfile' suggests:
"if ( simple expression ) then
list of expressions
elseif ( simple expression ) then
list of expressions
else
list of expressions
endif"

So - should I be using FormCalc or Java?? If so how? There are 5 options for the user to choose from resulting in various combinations of the 9 subforms.

Help! As brain is now fried!
thanks
Al

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Thank you for posting to another thread. However, I've already answered this on your last thread.

http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=15302

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/]http://www.adobe.com/devnet/acrobat/[/url]

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