Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

how to hide a static text depending on a condition?

Avatar

Former Community Member
hi,



hi all,



my requirement is to display a watermark showing the text draft unapproved copy on all the pages...the watermark will appear if a particular condition is satisfied



ie if ekko-frgke = 2.



now what i have done i have inserted a subform on master page..inside the subform i have created a statix text containing the watermark text and a text field and binded that text field to ekko-frgke..



now i have written a script on the text field which i binded with ekko-frke..language formcalc run at client and server and event form ready event.



the script goes like this



if ($.rawvalue == '2'.)

$.parent.presence = ''visible''

else

$.parent.presence = ''hidden''



endif



but in both conditions the watermark is appearing.



can anyone tell me where i am going wrong and what should be the appropriate formcalc script for this requirement..



one more thing is that though i am choosing the form:ready event but when i am activating the form instead of showing formready event it is showing the event events with scripts...



can anyone give me the proper formcalc script which will work in my case..
1 Reply

Avatar

Level 7
You need to provide the fully qualified reference to the "parent" object.