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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Hide / show a master page field, on specific pages accessing by the pagename


Not applicable


i have a field in the masterpage that i need to hide on some particular pages of a pdf form.

the scope is to hide the field called "phone" in an empty pages named "BlankPage"

this is my PDF structure:

- form1

     - (Master Pages)

          - MASTER (with the field that i need nto hide: "phone")

     - Page1

     - BlankPage1

     - Page2

     - BlankPage2

     - ...

in the MSF1701.#pageSet[0].MASTER::ready:layout i put something like this but i was unable to make it works:

if ( == "BlankPage") {

      xfa.resolveNode("phone").presence = "invisible";


else {

      xfa.resolveNode("phone").presence = "visible";


.. i need this kind of solution, please don't tell me to copy "phone" field on every page and calculate the value from the master page


1 Reply


Level 10


Why not place it on Page1 and Page2. You can set the binding of the phone object to Global, so that when any instance of phone has a value, it will automatically be displayed in all instances of phone. No script required.

Also using the layout:ready event will have a hit on performance, as this event fires EVERYTIME an object changes anywhere on the form. I don't think you will be able to get the page name that the page that is displayed (as the object is on the Master Page); however you can get the instance number of the Master Page. So if you really want to go for script on the Master Page then this in the layout:ready event of the phone object should work:

if (this.parent.index == 0 || this.parent.index == 2) {

     this.presence = "visible";


else {

     this.presence = "invisible";


As I say, I would not use the script solution.

Hope that helps,