Expand my Community achievements bar.

Subforms that dissappear on email/print

Avatar

Level 2

I currently have a form that I created in LiveCycle that 'unhides' forms depending on a selection made in a drop down box.  It functions properly while in the form, but when emailing or printing the form, the pieces that are 'unhidden' disappear. Not really sure why it is doing it.  I have all of the fields presence set to 'visible'.  I also can't quite figure out how to attach the file here.  Any assistance would be greatly appreciated!  Thank you!

7 Replies

Avatar

Level 5

If its a dynamic pdf, which it sounds like it is, make sure any scripting changes to the layout are stored. Goto File->Form Properties->Defaults tab. Preserve scripting changes should be set to Automatically. If its not set then your pdf will be reset and unhidden will revert to hidden again.

Avatar

Level 2

That setting was on automatic already.  I'm wondering if that may have something to do with it though.  Because the form seems to save the data in it, but when the user prints or emails the form the do go back to being hidden.  Does it possibly have something to do with the 'local' aspect of saving scripting changes?

Avatar

Level 5

You have a sample form you put up somewhere to try out? I tried using print and email of a dynamic form and it held its changes correctly. Which version of Designer are you using at the moment?

Avatar

Level 2

I don't have anything anywhere currently.  I wasn't sure where the best place to put it would be.  I could email it to you if you would like.

Avatar

Level 5

Thanks for the pdf. Took a quick look and its just a scripting issue. Automatic state change persistance only works when you set the initial view through designer and not scripting. For example you have in several places put the following

Why.presence = "hidden";

This will hide the object no matter what previous state changes there may have been esp in initialise which gets called when reopening on email and executing a print.

You either need to check for existing value if you want to keep that approach, so it would be in javascript

if (Why.isNull)

    Why.presence = "hidden";


Otherwise remove the initialise scripting all together and set the initial view of these objects within designer.