Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Master Page - Header Issue

Avatar

Not applicable

Hi,

I have created a form where I would like the use to be able to select whether it is Option A or Option B, depending on what option they choose will then define the headers that have to be used on the Master Pages as Headers.

I am not sure how to go about writing the code for this and would appreciate any help if anyone else has found a way to do this.

Thanks

0 Replies

Avatar

Level 10

To change an object on all instances of a masterpage you can use a loop.

Assuming your form has this structure.

form1

     (masterpage)

          MasterPage

               HeadlineA

               HeadlineB

               ...

     Page1

          ...

     Page2

          ...

Then you can loop through the instances with this script.

for (var i = 0; i < xfa.host.numPages; i++)

     {

     var oHeadline = xfa.resolveNode("form1.#pageSet.MasterPage[" + i + "]");

     oHeadline.HeadlineA.presence = "visible";

     oHeadline.HeadlineA.presence = "invisible";

     }

Avatar

Not applicable

Yes my form has that layout, would I put the headlines as hidden on the master page and what would I use to run the instances (button or drop down list).

Sorry for the basic questions but am just getting to grips with Livecycle.

Thanks