Hello all.
I am trying to create a static PDF where the user can choose to hide certain sections.
The concept :
- The user opens a blank document
- Unselects the sections are not applicable
- They then Save the PDF
- And reopens it so the unwanted sections are not visible.
The challenge :
- I have a section on the main page ( Page_Main ) where they uncheck/check the sections
- After saving & reopening, I set the presence of the unchecked sections to hidden/visible depending on the selection in #1
- If I do this in an IF statement, the code runs but does not hide the sections
However, the same code works without the IF statement
I have attached the XDP that I am using ( Adobe LiveCycle ES2 , v9.0.0.2)
I do a SaveAs a static PDF (attached) for general use ( Static because I want to run this on an iPad )
Can anyone shed light on why this works without an IF statement but does not when enclosed in an IF statement ?
Any other solutions would help
Thanks for your help
Aubrey Fernandes
The code :
form1::initialize - (JavaScript, client)
//Hides any sections depending on the Checkbox state
if ( Page_Main.sfButtons.table_CE.rowCE1.CheckBox1.rawValue == 0 ) { Page_CE.sfCE1.presence = "hidden"; }
if ( Page_Main.sfButtons.table_CE.rowCE2.CheckBox1.rawValue == 0 ) { Page_CE.sfCE2.presence = "hidden"; }
if ( Page_Main.sfButtons.table_CE.rowCE3.CheckBox1.rawValue == 0 ) { Page_CE.sfCE3.presence = "hidden"; }
if ( Page_Main.sfButtons.table_CE.rowCE4.CheckBox1.rawValue == 0 ) { Page_CE.sfCE4.presence = "hidden"; }
//Shows any sections depending on the Checkbox state
if ( Page_Main.sfButtons.table_CE.rowCE1.CheckBox1.rawValue == 1 ) { Page_CE.sfCE1.presence = "visible"; }
if ( Page_Main.sfButtons.table_CE.rowCE2.CheckBox1.rawValue == 1 ) { Page_CE.sfCE2.presence = "visible"; }
if ( Page_Main.sfButtons.table_CE.rowCE3.CheckBox1.rawValue == 1 ) { Page_CE.sfCE3.presence = "visible"; }
if ( Page_Main.sfButtons.table_CE.rowCE4.CheckBox1.rawValue == 1 ) { Page_CE.sfCE4.presence = "visible"; }
//for debug, I forced hid the 4th section - This works but above code does not !
Page_CE.sfCE4.presence = "hidden";