Expand my Community achievements bar.

unhidden pages disappearing when saved Reader enabled form

Avatar

Former Community Member

I thought that I was pretty close to completing this form project and was just doing some final testing and found an odd problem.

At first I had all pages except page 1 hidden via small script in the initialize event of the form.

When the user selects from a dropdown list, an appropriate second checklist page becomes visible.

As the user then selects the various checkboxes in page 2, additional document become visible. The user would then fill in the fields in those other documents, then save to form.

They should be able to then go back to change, finish or print the saved form. However, when I open the saved form....only page 1 is showing. I figured it was because I had the presence set to hidden in the initialize event, so I changed that to have the page hidden excluded from layout instead. I tested again and same thing is happening.

I'm at a loss. I thought I had this thing dancing a jig since everything was working perfectly until I saved the form and then reopenned the saved document. Anyone have any suggestions?

2 Replies

Avatar

Former Community Member

If it helps, below are samples of the scripts that show a checklist, then the scrip that would show additional page when a checkbox is clicked from the checklist.

I only commented out (//) the original script to make presence hidden in the initialize event. Could this cause odd behavior when using a reader enabled version of a dynamic form?

sample1:

in the change event of a dropdown list

AcctOpenProcesssubform.CSSystemSetupForm.Account_Client_Info.CHOOSE_ACCOUNT_TYPE_HERE::change - (JavaScript, client)

if ($.boundItem(xfa.event.newText) == "45 - Revocable-Joint" || $.boundItem(xfa.event.newText) == "45 - Revocable-Single") {
  this.resolveNode("RevTrust").presence = "visible";
}
else {
  this.resolveNode("RevTrust").presence = "hidden";
  xfa.layout.relayout();
}


Sample2:

AcctOpenProcesssubform.RevTrust.RevTrACHAuth::click - (JavaScript, client)

if (this.rawValue == "1") {
  ACHAuth.presence = "visible";
}
else {
  ACHAuth.presence = "hidden";
  xfa.layout.relayout();
}

Avatar

Former Community Member

Anyone?

I'm stumped. When the form is saved then reoppened the pages that were visible presave are now hidden again.

I did get the checklist page to remain visible by removing the script to set its presence to hidden from the initialize event and just set the propertiy to Hidden (exclude from layout) on the object pallette.

The boxes I selected before saving are still checked but the associated pages are hidden. I dont want the user to have to go back and reselect everything. That would not be a smooth user experience.

Is there a script I can add that would basically fire any event?