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

Custom Validation in Nintex Forms 2013 not working

Jump to solution

Hi,

I have upgraded the Nintex forms 2010 to Nintex Forms 2013 while upgrading our Sharepoint 2010 environment to SharePoint 2013.

There were Required Field Columns hidden from the view which will not get validated as they are hiddne. After moving to Nintex 2013, the hidden fields started throwing form required validation errors.

I read somewhere that the Nintex Forms 2013 has changed and it would not be an option to have a hidden field in the form and skip required field validation.

So I removed the required option from the SharePoint list and wrote a custom validation function which is mentioned below.

So when Edit Mode the Custom Validation fired and did not show the custom validation message. it actually closed the form instead of staying in the form. Kindly help as soon as possible,

I was expecting that the arguments.IsValid = false; will have the form stay and show the custom validation error messge, but it closed the form.

Can somebody help to what needs to be done in the below script to have the form stay and show the custom error message ?

function mustNotBeBlank(source, arguments)

{

     var strModeEdit = "Is Edit Mode";

       if (strModeEdit.toLowerCase() == "true")

       {

              arguments.IsValid=true;

              var titleText = arguments.Value;

              if (titleText == "")

              {

                   arguments.IsValid=false;

                    alert("Please Enter Closure Date");

               }

         }

}

Thanks,

Senthil Kumaresan.

Labels: (3)
Tags (1)
Reply
4 Replies
Highlighted
miketrourad
Nintex Newbie

Re: Custom Validation in Nintex Forms 2013 not working

Jump to solution

Senthil-

Were you ever able to resolve this issue? I have some custom validation I am doing on the "Save and Submit" button. The error is trapped and I set arguments.IsValid = false but the form closes if there are no other invalid items.

Mike Trouard

0 Kudos
Reply
mlauer
Nintex Newbie

Re: Custom Validation in Nintex Forms 2013 not working

Jump to solution

Looks like a Javascript error. What says debugging console?

Reply
emis
Nintex Newbie

Re: Custom Validation in Nintex Forms 2013 not working

Jump to solution

Instead of removing the field and using custom javascript, you can resolve this "hidden" issue if you set instead of a rule the visible setting in "control settings->appearance-->visible->expression". Here you can use an expression to hide the field. The required field will not be validated and you can use the form without any custom JavaScript. This works fine in Nintex Forms 2013.

Reply
Not applicable

Re: Custom Validation in Nintex Forms 2013 not working

Jump to solution

i tried similar custom validation function. i checked the console too the script is working fine.

but during  save the form closes.the function is executed.but the form ignores the result

Reply