Expand my Community achievements bar.

Printing selected check boxes

Avatar

Former Community Member
I am creating a form where a user can check up to 20 check boxes... How can a make it so only the SELECTED/CHECKED check boxes get printed. I think i can make a hidden subform where as the boxes are checked it populated the name of that box... then make that hidden sub field visible only at print. Can anyone give some guidance, thanks!
4 Replies

Avatar

Level 5
In the 'preprint' event of each checkBox use the following JavaScript.



if (this.rawValue == 0) { //not checked

this.presence = "hidden";

}



also use the following in 'postprint' event of each checkBox if you wish to make all those visible.



this.presence = "visible";

Avatar

Former Community Member
Thanks for the reply.. so if i had a check box call 'Network' the script should look like this?



if (network.rawValue == 0) { //not checked

Network.presence = "hidden";

}

And the object properties in the GUI editor should be 'visible'?

Avatar

Level 5
The code I had in my reply is generalized code can be used with any checkBox irrespective of name. No customizations required to get what you need. In the code "this" references the object that code is associated with hence you do not have to specify the name of the object. So use the same code over and over with each check box as indicated.