Show/hide cover letter from button click

zyrusc13762308 14-12-2018


My client is looking for a solution where, say on a page of a form, they can click on a button to "add a cover letter" to the form that would then become a first page. I had done this before (via a simple show/hide subform) but I'm seeing now that the version I created essentially was a static/non-expanding page that I had added to a flowable form (no subforms on that specific pages hierarchy).

Going back and forth from that other form that I did a while ago, I haven't been able to replicate that functionality on this new form for some reason. I have master pages working on this new version for the flowable content and when the button to hide the cover letter is clicked, it looks like the subform for the cover letter is only hidden, not the entire page. What am I missing? If you have a form that uses master pages, how would you effectively hide a page along with it's master page?

There's also the assumption that my client will probably request that the new cover letter allow for expandable text fields. Is this possible? I'm not sure why this recent form isn't working like the last one did. What could I be missing?



Mark Solution

Are these answers useful?
Help other community members by marking useful answers as accepted.

Accepted Solutions (0)

Answers (3)

Answers (3)

MinusZero 17-12-2018

I had a look. I have had this problem as well and never found a solution. It seems like a limitation of XFA forms.

I found this: There is a restriction in XFA that the 1st Master page definition must be used. Any subsequent ones can be unised ...but the 1st one must be used!

Hide first Master Page

A further thought: When i clicked the Add Cover Letter button, it threw an error, there is an incorrect reference. I dont think it will help with hiding the page.

GeneralError: Operation failed.


Invalid property get operation; subform doesn't have property 'sfLetter1'

zyrusc13762308 17-12-2018

Thanks for the suggestion, MinusZero​;

I tried using resolveNode but it seems it's still happening. I've uploaded a version of the form to Drop Box for download. Can you take a look at it and tell me what I might be doing wrong?

I really appreciate it.


MinusZero 16-12-2018

Are you using resolveNode? I find sometimes when i am having trouble I do that and it works. I have never need to hide a master page, it should be attached to the page itself. Check your references.


this.resolveNode("topmostSubform.CoverLetter").presence = "hidden";