Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Problems Scripting a NumericField event...


Level 2

I do have a problem scripting an event for my numericField - I want the numericField to hide another object if the user enters 0 in the numeric field. Unfortunately this script does not work correctly - and I do not know why and need assistance (if you can also tell me how to hide more than one object without subpages that would be wonderful, too...)

My non working script:

Formular1.superframe.administrator.NumerischesFeld4::change - (JavaScript, client)

if (this.rawValue=="0")


xfa.form.Formular1.superframe.administrator.compdistribdetail.presence = "invisible"




xfa.form.Formular1.superframe.administrator.compdistribdetail.presence = "visible"

2 Replies


Former Community Member
Hi Soenke,

Your script must work on the exit event of the field, not in the change event. And also it would be better to make comparison on numeric fields without quotation marks. this.rawValue == 0 is better.

In further assistance and consultancy, do not hesitate to contact me.




Level 2
Thanks a lot - you were a great help !!!

And thanks for the offered further assistance as well...