Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Show a hidden object on the master page

Avatar

Level 3

I'm struggling to be able to show a hidden object (text field) on the master page, when I select an item from a drop-down on a standard page. The item shows initially, but the next time there is an action to show a different area on a standard page, the hidden object on the master page disappears again! Any idea why this is happening, and how to fix it?

3 Replies

Avatar

Level 10

Why do you place that text field onto a master page and not on a body page? A master page is intended for static layout things in the background (logos, header, footer etc.) of the forms pages. Every new page has it's own instance of that master page, so to keep interactive objects syncron in the entire form requires to update every instance then. This can be become complicated depending on your design and the existings scriptings. So it's not recommended to do so which brings me back to my initial question.

Avatar

Level 4

@lostfrogg: as @radzmar says, the master page is not the best location for such things. To explain the behavior of the object a bit more:

The master page is a normally a static backdrop for the surfaces (pages) where you define the areas of content (that you can then place in page subforms) and things like the page numbering and fixed footers etc etc. When there are layout changes in dynamic forms, the master page instances get re-rendered and everything falls back to the designed state.

When you go and use the .presence="" on a master page object in a script you may see it appearing when in interactive mode in the Reader. But everytime there is a re-render taking place the object falls back into its original state. That might also happen when you open that PDF again later.

 

You would have to use scripting in the master page object to determine its initial state based on something in the data and that must execute every time the master page is re-rendered (initialize).

 

Give us an idea of what you want to do and why.

Avatar

Level 3

I have a title bar at the top of each page, which I have set from the master page. I wanted some objects to be invisible/visible here depending on user input. Your replies suggest that this is perhaps not the best option; I have put them at the top of the main area instead, and now it works fine!