Skip to main content
Nintex Community Menu Bar

Execute javascript code after form validation

  • April 14, 2017
  • 1 reply
  • 14 views

Forum|alt.badge.img+4

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

1 reply

Forum|alt.badge.img+4
  • Author
  • Nintex Partner
  • April 15, 2017

This link helped me  

I used Page_ClientValidate() before disabling the dropdowns!

Thanks