AnsweredAssumed Answered

Execute javascript code after form validation

Question asked by ksivanandan on Apr 14, 2017
Latest reply on Apr 15, 2017 by ksivanandan

Hello

 Execute javascript code after nintex form validation completes but my code is called before validation

I tried the above and the dropdowns are not disabled: the css display ==none does not work even if the validation summary is empty. It is always 'block'. However when I debug I hit the statement if (NWF$('.nf-validation-summary').css('display') == 'none')
Button Submit - client click NWF$(document).ready(function(){Buttons.onSave();});
javascript
NWF$(document).ready(function()
{
some logic...
});

var Buttons = {
onSave: function () {
DropDowns.disableAll();
}
};

var DropDowns = {
// Disables all choice controls (pt2 : workaround for invalid view-state)
disableAll: function () {
if (NWF$('.nf-validation-summary').css('display') == 'none')
{
NWF$('.customDropDown').prop('disabled', true);
}
}
}

 

I even tried : 

NWF$(document).submit(function () {
DropDowns.populateTextBoxes();
if (NWF$('.nf-validation-summary').css('display') == 'none')
{
NWF$('.customDropDown').prop('disabled', true);
}
});

 

So I have set validation rules to check for null or empty against the dropdown that is populated by jQuery, and although I select a value - it is always empty as well.

 

The problem could be two fold.

 
Thanks
Kalpana

Outcomes