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

Showing a Hidden Field after either checkboxes have been checked and all fields have been filled out

Michelle Graham
Registered: Nov 16 2010
Posts: 6

I am having a problem getting a subform to become visible after all text fields are not empty and after one of two checkboxes have been checked. I have three sets of checkboxes.
I have tried both formcalc and javascript
here is my javascript, please advise
 
if ((this.resolveNode("Eberline_IndicationRow1").rawValue != null
&& this.resolveNode("Eberline_IndicationRow1").rawValue != "")
&& (this.resolveNode("DCS_IndicationRow1").rawValue != null
&& this.resolveNode("DCS_IndicationRow1").rawValue != "")
&& (this.resolveNode("$").rawValue != null
&& this.resolveNode("$").rawValue != "")
&& (this.resolveNode("DCS_Indicationo_Alarm_Received_desired_o_No_Alarm").rawValue != null
&& this.resolveNode("DCS_Indicationo_Alarm_Received_desired_o_No_Alarm").rawValue != ""))
&&
((this.resolveNode("Pre_check_Normal").rawValue == "1") || (this.resolveNode("Pre_Check_Alarm").rawValue == "1")) &&
((this.resolveNode("Signal_Check_Alarm").rawValue == "1") || (this.resolveNode("Signal_Check_No_Alarm").rawValue == "1")) &&
((this.resolveNode("Post_check_normal").rawValue == "1")|| (this.resolveNode("this").rawValue == "1"));
 
{
this.resolveNode("DSCArm-RIReadings").presence = "visible";

Michelle Graham

My Product Information:
LiveCycle Designer, Windows
DaveyB
Registered: Dec 10 2010
Posts: 70
I don't know if you have resolved this yet or not, I'm guessing you probably have.

On reading through the code, there is an error in the penultimate line:

((this.resolveNode("Post_check_normal").rawValue == "1")|| (this.resolveNode("this").rawValue == "1"));

The second resolveNode on that line doesn't name a field, but refers to "this" instead. Since the general rule is that if any part of an equation fails, the equation returns null, then this entire code snippet will always return null, so it will not ever change the presence of "DSCArm-RIReadings" on the last line.

Sorry it took so long to get an answer out for you, I've only recently joined the site as a user and have been working my way back through the problems presented as a way of getting up to speed on this :)

LiveCycle Designer 8.0
"Genius is one percent inspiration, ninety-nine percent perspiration." ~~ Thomas Edison
"If at first you don't succeed, get a bigger hammer." ~~ Alan Lewis
"If the conventional doesn't work, try the unconventional" ~~ DaveyB