Expand my Community achievements bar.

Can I make complete pages disappear?

Avatar

Former Community Member
Hello together,



Once again, Ive got a question.



Right now I am using:



if (this.rawValue == 1) {

form1.presence = "visible";

}else{

form1.presence = "invisible";

}



So I can make forms and sub-forms disappear, but can I make the entire page disappear so I dont have a blank page with nothing on it?



Thanks in advance,



Kevin
3 Replies

Avatar

Former Community Member
KevinKraft@adobeforums.com wrote:

> Hello together,

>

> Once again, Ive got a question.

>

> Right now I am using:

>

> if (this.rawValue == 1) {

> form1.presence = "visible";

> }else{

> form1.presence = "invisible";

> }

>

> So I can make forms and sub-forms disappear, but can I make the entire page disappear so I dont have a blank page with nothing on it?

>

> Thanks in advance,

>

> Kevin



Yes, substitute "hidden" instead of "invisible".



--

Justin Klei

Cardinal Solutions Group

www.cardinalsolutions.com

Avatar

Former Community Member
Hi Justin,



I am just blown away by this LiveCycle Designer. It is a great tool.



Thank you for your reply and answer, it worked.



All the best,



Kevin

Avatar

Former Community Member
Hi Justin,



I have this 7 pages form I am working on, and pages 4 through 7 with its objects only become visible and print the respective fields if the subsequent more button is selected on the previous page.



I wrote the following code incorporating your suggestion, but it does not work. Here it is:



var today = new Date();

var month = today.getMonth() + 1;



if (btnPage1.rawValue == 1){

Page4.presence = "visible";

P2Heading.presence = "visible";

P2FormInfo.presence = "visible";

P2Date.presence = "visible";

P2PageInfo.presence = "visible";

P2REMARKS.presence = "visible";

btnPage2.presence = "visible";

//P2_VISIBLE.rawValue = 1;

Form4.Printable = true;

//Page2.CESVisible() = true;

//this.CESVisible() = false;

//Form.ComponentMap.GoToField("P2REMARKS");



//if (this.rawValue == 1) {



//REM_CONTD.rawValue = 1;

//REM_CONTD.CESVisible() = 1;

P2Heading.Caption = "Claimant: " + CLMNTNAME.rawValue + " SSN: " + CASE_COSSN.rawValue;

P2FormInfo.Caption = "Attachment to " + FormVersion.Caption;

P2PageInfo.Caption = "Page 2 of 2";

P2Date.Caption = month + "/" + today.getDate() + "/" + today.getFullYear();

Page2.Printable = true;

//Page2.CESVisible() = true;

//btnPage1.CESVisible() = false;

//REMARKS.NextField = "P2REMARKS";



try { Form.FireFormEvent("visible_page_count_change");

}

catch (e) { xfa.host.messageBox(0, "Unable to generate event to change page count", "Error");

}

else{

Page4.presence = "hidden";

P2Heading.presence = "hidden";

P2FormInfo.presence = "hidden";

P2Date.presence = "hidden";

P2PageInfo.presence = "hidden";

P2REMARKS.presence = "hidden";

btnPage2.presence = "hidden";

}



}



Presently, the btnPage1 with this code is placed on page 3 of this form.



Thanks



Lucky Pianwi