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

Rule dont apply after update value with javascript

Jump to solution

Hi,

I use javascript to update a value of a textfield (txtStepID) in my Nintex Form. There are several formatting rules on different controls triggered on this value. Since upgrading to nintex Form from V 2.4.0.0 to 2.5.0.0 the rule is not recognized anymore. I see the value changes due to the step but the rule just don't fire. If I change the field value manually in the textbox the rule is working perfectly.

Here is the javascript I use to update my textbox value:

function goNext() {

    var txtStep = NWF$("#" + txtStepID);

    var stepNumber = txtStep.val();

    stepNumber++;

    goStep(stepNumber);

}

function goPrev() {

    var txtStep = NWF$("#" + txtStepID);

    var stepNumber = txtStep.val();

    stepNumber--;

    goStep(stepNumber);

}

function goStep(stepNumber) {

    var txtStep = NWF$("#" + txtStepID);

    txtStep.val(stepNumber);

    txtStep.trigger("change");

}

Tags (2)
Reply
3 Replies
rm
Nintex Newbie

Re: Rule dont apply after update value with javascript

Jump to solution

Found it:

...Since V 2.5.x.x Nintex Forms is triggering rule events onblur instead onchange

Therefore I had to change my code as follows:

txtStep.trigger("blur");

Reply
pramod_nagaraj1
Nintex Newbie

Re: Rule dont apply after update value with javascript

Jump to solution

This perfectly works. Thanks Roman Mellenberger

Cheers

Pramod

0 Kudos
Reply
bimi82
Nintex Newbie

Re: Rule dont apply after update value with javascript

Jump to solution

May I ask what this script does?

I fail to reproduce the same ...

maybe screenshots (before / after) would provide more information

0 Kudos
Reply