Skip to main content
Nintex Community Menu Bar

Formating rule not working with checkbox set by script

  • Apr 26, 2016 11:07 AM UTC
  • 6 replies
  • 32 views
  • Translate All

Forum|alt.badge.img+3

Hello fellow Nintex Admins,

i use a formating rule that only shows a region of the form if a checkbox is checked:

183203_pastedImage_0.png

183204_pastedImage_1.png

183205_pastedImage_2.png

This works just fine, if i click the checkbox in the user context. The problem is, that the Region has show up, when a user types something in a special field. So with the help of another forums member i added this code line to an existing function:

183206_pastedImage_3.png

and this works for the checkbox, but the rule doesn't fire to show the region.

Any ideas?

Cheers

Daniel

6 replies

Forum|alt.badge.img+8

Hello Daniel Will​ – Have you tried triggering a change event on that element after you've checked the box? Oftentimes when an HTML property is manipulated with JavaScript (without user-input on the control), the change event isn't triggered.

You can do this using:

NWF$('#' + varBereitstellung).trigger('change');

Translate

Forum|alt.badge.img+9
  • Apr 27, 2016 7:04 AM UTC

You're right, I succeeded with

NWF$('#' + varBereitstellung).trigger('focusout');

or

NWF.FormFiller.Functions.ProcessOnChange(NWF$('#' + varBereitstellung));

Translate

Forum|alt.badge.img+3
  • Author
  • Apr 28, 2016 7:50 AM UTC

Hi Patrick Aebi​, Manfred Lauer​, Frank Field​

sorry for my late response, i had a focus on other things the last days.

I can only choose one answer as the right one, but Patrick and Manfred had the right solutions. happy.png

For me two codlines work:

NWF$('#' + varBereitstellung).trigger('change'); or NWF.FormFiller.Functions.ProcessOnChange(NWF$('#' + varBereitstellung));

Is one of this preferable?

Big thank you to you guys. This forum ist really helpful for beginners.

Cheers

Daniel

Translate

Forum|alt.badge.img+8

I'm glad that worked for you Daniel Will​, happy to help!

Translate

Forum|alt.badge.img+2
  • Nintex Partner
  • Jun 8, 2017 8:11 PM UTC

Thanks Patrick!  This worked great for me.

Translate

Forum|alt.badge.img+8

Happy to help ‌!

Translate