I have a text field that I'm trying to make visible or invisible based on the value of a checkbox in LiveCycle Designer 8.2 The javascript seems to trigger, but it doesn't change the visibility of the checkbox. Here's the code...
EquiptReqForm.MainForm.AppReqs.CLMCentral::change - (JavaScript, client)
if (this.rawValue == 1)
{
ClmDetails.presence = "visible";
ClmDetails.mandatory = "error";
ClmDetails.mandatoryMessage = "Specify Health Plans, Medical Groups, and Master Calendar Partners if CLM Central is selected.";
}
else
{
ClmDetails.presence = "invisible";
ClmDetails.mandatory = "disabled";
}
CLMCentral is the checkbox; ClmDetails is the text field (which defaults to invisible). Both controls are in the same sub-form. I get the mandatoryMessage after checking and un-checking the box, but the text field never becomes visible.
Is there something obvious that I'm missing?
UPDATE: The problem seems to be specific to the visibility code; with those lines commented out, the code that makes the field mandatory seems to work.
I personally think that "invisible" should be useful on a static form since it doesn't change the layout, but that's not how they designed it:(
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