Form Validation rules don't block on submit

  • 30 March 2016
  • 4 replies
  • 16 views

Userlevel 2
Badge +6

I'm using Validation and Formatting rules and they all working fine everywhere expect...

I encountered a very disturbing issue (with 2 separate form) with validation rules and I can't solve it.

I don't use any custom JS right now.

Situation:

  • I set Validation rules for 1 or more controls (I tried both the control name and the {Self} references)
  • I tested the rules in calculated values to make sure it's correct (even with a simple isnulloremprty())
  • On Submit form the
    • SP List defined validation stops it and shows I have required files. That's fine.
    • The Validation Rules highlights the problematic field (I can see the red border, so they should work) then for some reason the Form refreshes and the red borders and error messages disappear and only the SP list defined missing required field vales are shown as errors.
    • If the required fields are filled out the from submit. The rules don't block. Data will be saved.  I need the rules for conditionally required filed)

I can't reproduce it on other forms, the but the form design is too complex (did by the business user) to simply delete the form and start again.

This "double refresh" could be the issue, but I don't  know what cause this.

Did any of you encountered similar issue?

Thanks in advance.


4 replies

Badge +6

Hi Robert,

Do you have something in the "Client click" attribute on the submit button?

181216_pastedImage_0.png

Hope this helps

Roman

Userlevel 2
Badge +6

Unfortunatly it's empty for me...

Userlevel 2
Badge +6

I think I found the root cause.

The user added a custom validation to a single line textbox (in the control's settings). This validation was incorrect.

I tried debugging (Developer tools: F12) the Form on submit and I found JS errors and a hint to which control was faulty.

I followed the control ID abnd found the validation attempt.

For some reason, if the validation is in incorrect format, the Nintex Form simpy skips every other validation too.

When I removed it the Form worked correctly.

181291_pastedImage_1.png

Steps to debug:

  • Publish the form (even if incoorrect) - can be debugged in the Preview window just harder...
  • Open new item form, open Developer tools (F12) - Sorry for the Hungarian labels on the screenshots happy.png
  • Submit the form: you get a syntax error

181334_pastedImage_8.png

  • Follow the trail with the inspector, check the "val" variable's details

181335_pastedImage_12.png

  • You can find the "clientvalidationfunction" and the "controltovalidate" property. You can find teh control in teh HTML DOM. Ctrl+F in the Page source.
  • The traced contol had something lik this in my case.

181336_pastedImage_14.png

With this I can reproduce the issue.

Userlevel 2
Badge +6

I fould the solution.

Thank you very!

Reply