How to hide similiar named fields on multiple pages that were spawned and bRenamed
Hi all,
Can use same help on trying to hide fields on multiple pages that was created from a hidden template page. You would click on the 'ADD PAGE' Button where it has this javascript linked to it.
this.getTemplate("Provider").spawn({nPage:this.numPages, bRename:true, bOverlay: false});
The fields on the hidden template page are prefaced with:
"P0.field_name"
Fields I want to hide are prefaced with:
"P0.Hidden.field_name"
When I click on the add page button, the above fields become prefaced (respectively):
"P#.Provider.P0.field_name"
"P#.Provider.P0.Hidden.field_name"
The # would represent the numbered page. So 'P1' after clicking 'ADD PAGE' button once, 'P2' after clicking 'ADD Page' button a second time.
I would like to now be able to hide all of the "P#.Provider.P0.Hidden" groups when I click on a 'HIDE' Button across all pages, no matter how many were created. The below script is using a hidden check box field to be able to turn on and off the hidden value using the same HIDE button. (just did it this way to test out various things)
var oChkFld = this.getField("HiddenCheck");
oChkFld.checkThisBox(0,!oChkFld.isBoxChecked(0));
this.getField("P#.Provider.P0.Hidden").display = (oChkFld.value=="Off") ? display.hidden : display.visible;
What is the correct way to hide all of those fields across all pages when the # is an unknown?
Thanks!
Mike
