cancel
Showing results for 
Search instead for 
Did you mean: 
daniel_will
Nintex Newbie

Formating rule not working with checkbox set by script

Jump to solution

Hello fellow Nintex Admins,

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

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:

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

Any ideas?

Cheers

Daniel

Labels: (3)
Tags (1)
Reply
7 Replies
Automation Master
Automation Master

Re: Formating rule not working with checkbox set by script

Jump to solution

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');

View solution in original post

Reply
mlauer
Nintex Newbie

Re: Formating rule not working with checkbox set by script

Jump to solution

You're right, I succeeded with

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

or

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

Reply
Not applicable

Re: Formating rule not working with checkbox set by script

Jump to solution

Hi, Daniel Will​, have you tried these suggestions? Any luck? Let us know. Thanks!

0 Kudos
Reply
daniel_will
Nintex Newbie

Re: Formating rule not working with checkbox set by script

Jump to solution

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.

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

Reply
Automation Master
Automation Master

Re: Formating rule not working with checkbox set by script

Jump to solution

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

0 Kudos
Reply
mmulherin
Nintex Newbie

Re: Formating rule not working with checkbox set by script

Jump to solution

Thanks Patrick!  This worked great for me.

Reply
Automation Master
Automation Master

Re: Formating rule not working with checkbox set by script

Jump to solution

Happy to help ‌!

0 Kudos
Reply