Avatar

Level 1

Hi,

I am posting this here because it is more of the Adobe form issue.

Here is my requirement, I have been struggling with.

I have 3 subforms of the same type(contains 8 fields each) to add family members. Subform 1 is mandatory and always visible. Subform 2 and 3 are hidden when the form loads. I have a javascript on the initialize event to hide them.

this.resolveNode("subform name").presence = "hidden";

When the user decides to add more details, clicks on the ADD button which makes the subform 2 and 3 visible, one at a time. Script under the click event of add button is:

if (this.resolveNode("subform2").presence == "hidden"){

this.resolveNode("subform2").presence = "visible";

this.resolveNode("PRI_DES2.PRI_FLAG2").rawValue = "X";      "I am also adding a flag on a field on the ADD button.

}

On the subform2 form ready event: I have the below code to have the subform2 visible.

if ( $record.PRI_FLAG2 == "X" ) then

       $.presence = "visible"

endif

Everything works fine till this point.

When the user fills the data and clicks on check & Send, the subform2 disappears; Note that the values in the fields are still there, I can see it when I click on the ADD button. I am sure the initialize event is triggering again on check & send, taking the form to the initial stage.

I tried various ways to restrict it. I am not using instance manager, just making subforms hidden / visible. I have both FORMCALC and Javascript on the form.

Please help with any suggestions / ask me for more details.

Thanks so much - Raj