Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Text Field on Master Page

Avatar

Level 4

I have a couple of Text Fields on the Master Page that repeat on the other pages. I want the user to only be able to input the information on the first page and not have access on the other pages. Is there a way to make this happen?

Thanks

Parre

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

yes, this can be done with a small FormCalc script in the layout:Ready event of the text field.

if (this.parent.index gt 0) then

          $.access = "readOnly"

endif

View solution in original post

6 Replies

Avatar

Correct answer by
Level 10

Hi,

yes, this can be done with a small FormCalc script in the layout:Ready event of the text field.

if (this.parent.index gt 0) then

          $.access = "readOnly"

endif

Avatar

Level 4

Thanks,

I don't know what I doing work, but this is not working. I copied the above script into the layout:ready event field of the text fields on the master page, but when I open the document in Acrobat enter data in the fields on page one and then go to page two it still allows me to enter data in those fields.

Any suggestions?

Thanks

Avatar

Level 10

Well,

is the text field placed directly on the master page or didi you wrap it into a subform?

Avatar

Level 4

Yes, it is wrapped into a subform.

Avatar

Level 4

I took it out of the subform and it worked just fine.

Thanks you very much for all your help

Avatar

Level 10

In the case you need to wrap it into a subform the code needs to be changed into:

if (this.parent.parent.index gt 0) then

           $.access = "readOnly"

endif

Explaination:

this = text field, 1st parent = subform, 2nd parent = master page, index = current index number of the repeated master page