For background, I have attempted to use the example which you can see at https://workspaces.acrobat.com/app.html#d=bOMoPw6V*nmsvHYZ*Iux3A. Note: if that page does not render correctly in your browser, there's a download button on the page where you can download a copy of show_hide.pdf.
Show_Hide.pdf has two very simple examples for showing/hiding a subform. There's a radiobutton yes/no group on the Master page and a radiobutton yes/no group on the regular page. They are both actually the same group (just repeated). Either one will show/hide a subform. Their code (which only works for onclick) is like this:
form1.Page1.showorhide::click - (JavaScript, client)
if(this.rawValue == 1){
form1.Page1.Subform1.presence = "visible";
}
else{
form1.Page1.Subform1.presence = "hidden";
}
where form1 = entire form; page1 = regular page; showorhide = the radiobutton yes/no group; Subform1 = the subform to be shown/hidden. Note: their Subform1 is set to Presence = Visible by default.
I have attempted to mimic this example, but my subform doesn't hide. My code reads like this:
form1.Sub_page1.Petr_Name_Changed_YN::click - (JavaScript, client)
if(this.rawValue == 1){
form1.Page1.SUB_Petr_Restore_Name.presence = "visible";
}
else{
form1.Page1.SUB_Petr_Restore_Name.presence = "hidden";
}
where form1 = entire form; Sub_page1 = regular page; Petr_Name_Changed_YN = my radiobutton yes/no group; SUB_Petr_Restore_Name = my subform to be shown/hidden. My Sub_Petr_Restore_Name is also set to Presence = Visible.
My subform stays visible no matter what. I've spent hours comparing settings between my document and the example, but I can't figure how where I've gone wrong. I need to get this down, because my document (when finished) will have about 20 subforms to show/hide based on radiobutton yes/no choices.