cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding a master page based on condition

Former Member
0 Kudos

Hi All,

I have created a form which has data on odd pages and some terms and condition on the back pages(even) pages. I am using Adobe Livecycle Designer ES version 8.1.2

For this I created 4 Master pages.

FirstPage - Pagination -> Odd/Even - > Odd (front) pages

Placement -> First Page (in Page set)

Front Page - Pagination -> Odd/Even - > Odd (front) pages

Placement -> Rest of pages

BackPage - Pagination -> Odd/Even - > Even (Back) pages

Placement -> Rest of pages

Dummy - Pagination -> Odd/Even - > Blank page

I dragged the content area of back page on the dummy page.

This set up works fine for printing.

I have additional requirement of archiving, emailing and faxing. While sending a email or fax or archiving, the data should be continuous, the 'BackPage' master page should be removed otherwise they show in alternate pages as blank pages even if i set the presence property to 'visible(print only)' .

Are there any settings which can be done to remove the master pages that are not needed based on a codition. Or can we achieve it through scripting.

Regards

Neha

Accepted Solutions (0)

Answers (3)

Answers (3)

sunil_mani
Active Participant
0 Kudos

You can hide the master page depending on any condition you have. But there is one clean rule. If your master page doesn't want to get printed then content area of that master page should not contain any data. It means even if you hide all the data in the content area, your whole master page ( including its instances i.e overflown pages) will be hidden.

For that you have to create a text field in your layout and drag and drop it in the content area of the master page which you want to hide. The text field acts like a flag whether or not to hide the master page. If 'X' then hide. Else do not hide. The value of the flag field will be decided while coding in the interface itself based on your condition. Then wrap the data of the content area including your flag field in a sub form. Do not forget to hide the flag field after wrapping it in the sub form because you don't want to show this on the page if that page is displayed by any chance.

Finally click on the whole wrapped sub form. Write below Form calc script in events Initialization, Form Ready and Layout Ready.

Here the HIDEPAGE_FLAG is nothing but your flag field.

if ( $.HIDEPAGE_FLAG == "X" ) then

$.presence = "hidden"

endif

This code hides your whole sub form . It means there will be no data shown in the content area and the Adobe framework doesn't print that specific master page(and all its instances). 🙂



Former Member
0 Kudos

Hie Sunil,

I have hierarchy like the picture shown you, I am new to adobe form

I have generate number of pages for my data and depending on the condition I am able to hide it also..

   I have 7 condition, and for each and every condition it works fine for me except the one in that I hide all the pages except page5 (Format_1). In that case the first page is visible as blank without any content and after that my page5(Format_1) is displayed.

     I want to hide that blank page,I dont know what is that whether its a master page or sumthing else.

Bitte help,

Mandar Gavkar

pavan_prabhu
Active Participant
0 Kudos

Hello Mandar,

     It is a Master page. Go to the Master page which is showing blank. On the right side, you can see the option "Restrict Page Occurence" .There the Min check box will be checked with value "1". So currently what is happening is irrespective of data present or not, there will be atleast 1 page which will be shown(even though if it is blank). So you need to uncheck that Min check box. Then your problem will be solved.

Former Member
0 Kudos

Please let me know how you solve it , i have the same issue

Regards

OttoGold
Active Contributor
0 Kudos

I don´t understand why do you want to hide a master page? The master page is "hidden" when it is not use. I mean: every "body" page is an instance of the master page, so when the master page is not instantiated, it is hidden.

So just hide the body page based on the condition.

Regards Otto

Former Member
0 Kudos

Thanks for the replies guys..

@Andres : there is a requirement for one form only...but if nothing works out that would be our last resort....

@Otto : I have tried hiding the body page but the problem is the set up for back side printing doesnt work then...

is it possible to set the occurance of master page to 0.

For back side printing (content on front side and T&C on back side) we have to have atleast 4 master pages like I stated above.

but the problem is when I assign a body page to the backside master page and try and drag the content area of that master page to the dummy master page (which is a blank page) I get an error and the designer stops working and it shuts down.

Please help.

Regards

Neha

OttoGold
Active Contributor
0 Kudos

I am sure your understand every detail of the task, but we do not (at least I don´t). Could you please describe othe the scenarios at the same time and describe all the differencies? I mean something like:

A: page1 (based on master X), page2 (based on Y), page3 (based on Z)

B: page1 (based on master X), page3 (based on Z)

Would it be possible?

Otto

Former Member
0 Kudos

Hi Otto,

I will try explaining the scenario...

The form has to support back side printing and will be archived, sent by mail and by fax.

The main content of the form will be on the front pages only and on the back side of the first page, the terms and conditions are printed.

the rest of the back pages remain blank.

Following the solution in the link below:

MasterPage -> Object pallete -> Page set -> Printing -> Print on both sides.(choosing this does not allow to set the occurance)

I created 4 master pages.

FirstPage - Pagination -> Odd/Even - > Odd (front) pages

Placement -> First Page (in Page set)

Content area -> C1

Front Page - Pagination -> Odd/Even - > Odd (front) pages

Placement -> Rest of pages

Content area -> C2

BackPage - Pagination -> Odd/Even - > Even (Back) pages

Placement -> Rest of pages

Dummy - Pagination -> Odd/Even - > Blank page

Content area -> C3 (Dragged the content area of BackPage to the dummy page)

I only have one Body page for now for the content and have put the terms and condition on the 'BackPage' master page itself as a text.

(If I create a Body Page for the terms and condition (so that I can set its visiblity property) and I try to assign the content area of 'BackPage' (now on dummyPage) the designer shuts down with an error.)

This works fine for the print set up.

Now when I save the form, after each front page a blank page is inserted.

I would like to remove this blank page.

Is there any other way to have content on front pages only and print certain text only at the back.

Please help.

Regards

Neha

andrs_sarcevic
Contributor
0 Kudos

I'm thinking instead of that, why don't you create a new form with your require layout for archiving, emailing and faxing scenarios?

I guess you will be able to call one or the other depending on the execution.

Regards,

Andres.