Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Saving forms with hidden Pages "visible"

Avatar

Former Community Member
Hi,



I just started using this last week and am totally new to this and have the faintest idea of programming.



Managed to create a form which has a few hidden pages that appear when a certain box is ticked. They have been set to presence="hidden" in the forms Initialize script.



However whenever I save the form and reopen it starts with all the pages hidden again..... I need to retick the box to have the hidden pages appear again.



Can anyone please explain me a way / script that would enable the pages to be visible upon opening the form if the box is checked and to be hidden when the box is not checked.



Thereby if a the box gets ticked it will save the required pages visible and if it gets unticked it will save the required pages hidden.



I am assuming I need to have some preSave script that changes the Initialize script according to the status of the checkbox..... but I seem to be in some kind of freaky 4day long nightmare trying to find a way to do this script.



Help would be extremely appreciated.



Thx.
9 Replies

Avatar

Level 2
You're not alone...I've been trying to do the same thing for several days. Any help would be greaty appreciated.

Avatar

Level 2
I finally got it to work in my form. I was using the incorrect event. I placed the following in the "initialize" event for the check box and it remains "visible" after saving.



if(this.rawValue==1)

{form1.p1.SF.SF2.SF3.presence="visible";}

else

{form1.p1.SF.SF2.SF3.presence="hidden";}

Avatar

Level 1

I am trying to figure this out myself. how do i initilize the event?

can you email me at jamison.tyler@verizonwireless.com

Avatar

Level 6

Select Subform4...7 and made them hidden (go to Object pallet: Subform TAB -> select Hidden (Exclude from layout) as presence value).

Then depends on ur check box value make the required subform presence hidden/visible.

ex: write script on  COLORVIEW change event

if

(this.rawValue == 1){

Subform*.presence

Subform*.presence

="visible";="hidden";="hidden";

Subform*.presence

} else{

="visible";="hidden";="hidden";

Subform*.presence

Subform*.presence

Subform*.presence

}

Raghu.

Avatar

Level 1

I have made the subforms hidden exclude from layout. I don't know how to insert the script into the form. I must be missing something simple.

Jamison

Jamison Tyler

Real Estate Specialist

Verizon Wireless

(480) 777-4336 Desk

(623) 203-7815 Mobile

Jamison.tyler@verizonwireless.com

Mailing Address:

VZW: ATTN Jamison Tyler

126 W Gemini Dr

Tempe, AZ 85283

Avatar

Level 1

I am still stuck.  I don't know where to place or how to place the condition/script on the check box.

here is what was presented so far:

Select Subform4...7 and made them hidden (go to Object pallet: Subform TAB -> select Hidden (Exclude from layout) as presence value).

Then depends on ur check box value make the required subform presence hidden/visible.

ex:

if

(this.rawValue == 1){

Subform*.presence

="visible";Subform*.presence

="hidden";Subform*.presence

="hidden";}

Avatar

Level 6

Please check the files for reference in the link: https://acrobat.com/#d=ItjkuOFTek3sP7I-qQ6MHg

and make sure while saving the file save it as "Adobe Dynamic.....". this u can select while doing save/save As pop-up.

Avatar

Former Community Member
Oh my gosh....... can't believe its that simple.....

The amount of hours I tried it, in my case I am now using the script in both events, the initialize and change. when the box gets ticked the following page shows up. then once save reopening the doc will show that page directly.



Fantastic.



Thanks a lot.

Avatar

Level 1

Can someone provide some assistance? I am new to livecycle and I am trying to

hide subform4 subform5 subform6 and subform

7 by default and show same subforms if checkbox named

"COLORVIEW" is checked.  I don't know how to initalize an event?