Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Show/Hide master page item

Avatar

Level 2

Hi Experts

I have a problem with Master page Hide/Visible Option.

my steps are here

If the textfiled value is ="Free"

I want to show the masterpage  Item Textfield2

I have done this using

form1.Page1.TextField2.presence= "visible";

xfa.resolveNode("form1.Page1.TextField2").presence = "visible";

but nothing works, also since my PDF is in dynamic format

here is the link for the PDF

http://www.4shared.com/document/eDuOAsDB/test.html


Kindly anyone help me out

Thanks in advance

Regards

arul

4 Replies

Avatar

Level 7

In the layout:ready event of the masterpage text field put (in Formcalc):

if (form1.PasswordForm.txtUserEnteredPass == "Free") then
$.presence = "visible"
else $.presence = "hidden"
endif


however as you have set the submit button to goto the next page and hide the first page when you put in 'Free' you will only see it flash for a second.

Avatar

Level 2

Hi whyisthisme

Thanks for your code this works but this flashing for a second and hides i want to have the textfield show perment

how can i do this?

Thanks again

Avatar

Level 7

Do you want the textbox to show on the PasswordForm page or the assessment page? At the moment you have the code so as soon as you enter the password 'Free' it goes to the assessment page and hides the password form page that's why it looks likes it is flashing. It is actually still there but the page is hidden.

Avatar

Level 7

I just realised the reason it is not showing on the assessment page (if you want it to) is that in the button script you have that once 'Free' is entered txtUserEnteredPass.rawValue = ""; That means that the value is no longer 'Free' and the masterpage textfield will be hidden again. As you are hiding the password page once the correct password is entered you can get rid of the line txtUserEnteredPass.rawValue = ""; and it will work fine.