Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Setting Presence of Subform

Avatar

Not applicable
How would I use a button on "click" to set the presence of a subform to "hidden"?



form1.pg1.subHeader.subCusInfo.presence("hidden")?
5 Replies

Avatar

Not applicable
I think is:

form1.pg1.subHeader.subCusInfo.presence= "hidden";

or maybe is in just in Javascript.

Avatar

Not applicable
Here you have a Java Script example which I hope it can help you.



b On Button Click-Event




// Getting the object's presence attribute


var presencia = xfa.resolveNode("Formulario1.page2").presence;


// Getting the button's text control


var val = xfa.resolveNode("this.caption.value.#text");






// If the page is hidden


if(presencia == "hidden"){


     val.value = "Hide Page";
// Changing the button text


     xfa.resolveNode("page2").presence =
"visible";

// Setting page to visible.


}else{


     val.value = "Show Page";
// Changing the button text


     xfa.resolveNode("page2").presence =
"hidden";

// Setting page to hidden.


}








Regards and good luck!



Dan

Avatar

Level 2

i tried to apply the same technique to my checkbox but it seems cannot works.

my code is

Avatar

Level 6

Use formcalc:

On Click event  of the check box:            

if ($.rawValue==1)then
form1.filteringform.chkOthersSubform.presence="visible"
else form1.filteringform.chkOthersSubform.presence="hidden"
endif