Hi All,
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 and placed it on the click event, 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