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.
SOLVED

Visible

Avatar

Level 3

So, I want to set a text block to be visible screen only when a user checks a box.  I create the text object as "hidden", and when a check box is clicked I want the text box to show but only on the screen - not printed.  I can set that property when I create it, but the .presence code only allows me to use "visible".  Is there a way to script that to be visible screen only?

Situation:  We have a form that uses digital signatures.  External folks cannot use our digital sigs (due to nature of our work we cannot have them use their own trust authority), so if a box is checked I hide all digiatl signature fields and replace with a text field and a line for them to sign.  Thing is, I don't want them to think they are trying to sign this digital form, so the text box that appears tells them to print the page and ink sign it, fill out the form electronically, scan and send both the electronic form and the printed form back.  I don't want that text field to print, just to show up on the screen.

My default form state is for digital signatures as most sigs are this.  So I have to setup the alternate signautre lines as hidden to start with, then show them when the checkbox is selected.

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi,

     The parameters that you can set with "presence" are "visible | invisible | hidden | simplex | duplex"

     In you case you have to use the "relevant" object and parameters you can set are "+print | -print"

Syntax for SOM expression

Reference_Syntax.relevant = "-print"; ----- this forces that particular object not to appear when the form is printed.

I hope this should work, let me know in case of any questions.

thanks,

Rajesh

View solution in original post

2 Replies

Avatar

Correct answer by
Level 4

Hi,

     The parameters that you can set with "presence" are "visible | invisible | hidden | simplex | duplex"

     In you case you have to use the "relevant" object and parameters you can set are "+print | -print"

Syntax for SOM expression

Reference_Syntax.relevant = "-print"; ----- this forces that particular object not to appear when the form is printed.

I hope this should work, let me know in case of any questions.

thanks,

Rajesh

Avatar

Level 3

Thanks Rajesh - worked like a charm!  I put the .relevant code in the intialize event of the form and all is good!

Jim