ksivanandan
Novice

Execute javascript code after form validation

Jump to solution

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

0 Kudos
Reply
1 Reply
ksivanandan
Novice

Re: Execute javascript code after form validation

Jump to solution

This link helped me  

I used Page_ClientValidate() before disabling the dropdowns!

Thanks

0 Kudos
Reply