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

Nintex forms - validation rules and repeating section with people picker control

Hi,

I've been working with Nintex Forms (2016, classic forms) and have noticed that the validation rules, applied to any controls in the form, are not firing after deleting the row(s) in the repeating section with people picker control in it. Is it a bug?

Labels: (1)
0 Kudos
Reply
5 Replies
Highlighted
Nintex Newbie

Re: Nintex forms - validation rules and repeating section with people picker control

@Jekaterina can you provide a screenshot or be a bit more specific. 

 

If you delete a row or control, the rule may become misconfigured in some way and therefore not firing as expected. It's hard to say without more details, but you may have to redo your rule if you delete something on the form. 

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Nintex forms - validation rules and repeating section with people picker control

@eharris04 

Please see the screenshot: the rule is applied to the controls in the first section of the form (1. Training info). The list columns are not required and conditional validation rule is applied to the controls as the form can be submitted as Draft without validation.

Below - 2 repeating section controls. First rep. section (2. Internal participants) has a people picker control in it, while the second (3. External participants) only textboxes.

The validation rule is firing properly when rep. sections are empty or rows were added. Also there are no issues when deleting the rows from the second repeating section. However, after deleting the row(s) from the first repeating section, the form saves and closes without firing the validation rule.

repeatingsection.PNG

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Nintex forms - validation rules and repeating section with people picker control

I've been having the same error on removing people from repeating section wich causes

Uncaught TypeError: Cannot read property 'disabled' of undefined
    at Object.IsControlDisabled (JavaScriptStringHandler.ashx?resourceType=jsfile&fileName=FormFiller.js&culture=ru-RU&rev=101.5.2.0:4032)
    at Object.NeedToBypass (JavaScriptStringHandler.ashx?resourceType=jsfile&fileName=FormFiller.js&culture=ru-RU&rev=101.5.2.0:4028)
    at HTMLSpanElement.<anonymous> (JavaScriptStringHandler.ashx?resourceType=jsfile&fileName=FormFiller.js&culture=ru-RU&rev=101.5.2.0:4007)
    at Function.each (jquery.js?rev=Um381uKrIZvkz6es8zyhcQ%3D%3DTAG0:659)
    at Object.SupressValidatorsForHiddenUnbound (JavaScriptStringHandler.ashx?resourceType=jsfile&fileName=FormFiller.js&culture=ru-RU&rev=101.5.2.0:4004)
    at HTMLInputElement.onclick (EditForm.aspx?ID=2&Source=https%3A%2F%2Fmysite%2FiLyas%2FLists%2FidealForm%2FAllItems.aspx:731)
0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: Nintex forms - validation rules and repeating section with people picker control

The problem is that Nintex Forms doesn't clean up after itself when it should, and it will leave the Validator references inside of the global Page_Validators variable. This means that when you Submit the Form and it runs through each of the Validators in that Array, it will eventually reach Validators that are referencing Controls that no longer exist (because they were deleted). 

 

To fix this oversight, I recommend using the following code in the Custom Javascript section of your Form's Settings: 

NWF.FormFiller.Events.RegisterRepeaterRowDeleting(function (thisRow) {
    thisRow.children(".nf-validator-error").each(function(index, validator){
      if (Page_Validators.indexOf(validator) > -1) {
        Page_Validators.splice(Page_Validators.indexOf(validator),1);
      }
    });
  });

I hope that this helps. 

Reply
Highlighted
Nintex Newbie

Re: Nintex forms - validation rules and repeating section with people picker control

It doesnt work for the first row of each repeating section (pRow.children(".nf-validator-error") is empty for the first row). If you delete the first row, you will have the same mistake.

I recommend to use something like that :

NWF.FormFiller.Events.RegisterRepeaterRowDeleting(function (pRow) {
  //Other row (doesnt work for first row of repeating section)
  if (pRow.children(".nf-validator-error").length > 0) {
   pRow.children(".nf-validator-error").each(function (index, validator) {
      if (Page_Validators.indexOf(validator) > -1) {                    
       Page_Validators.splice(Page_Validators.indexOf(validator), 1);
      }
   });
  }
  //First row
  else {
   pRow.find(".nf-validator-error").each(function (index, validator) {
      if (Page_Validators.indexOf(validator) > -1) {                    
        Page_Validators.splice(Page_Validators.indexOf(validator), 1);
      }
   });
  }
});
0 Kudos
Reply