Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Check box to limit printing

Avatar

Level 6

I have a form with a series instructions (static text).  Each instruction has a check box that is checked off if the instruction applies.  What I am seeking to do is print the form but display only those instructions that have been checked off.

 

Playing with this but can't get it to work:

 

if (rawValue == true) {

CheckboxName.presence = "visible";

CheckboxName.relevant = "";

}

else {

CheckboxName.presence = "visible";

CheckboxName.relevant = "-print";

}

1 Reply

Avatar

Former Community Member

Hi paulk07,

One way to get around your requirement would be to use the prePrint and postPrint events.

This way you can hide your checkbox before printing and show it back after printing :

prePrint event

(if cb.rawValue == 1)

     cb.presence = "hidden";

postPrint event

(if cb.rawValue == 1)

     cb.presence = "visible";

Hope this helps,

Regards,

Thomas