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

Validation Rules on Button JS

Jump to solution

Hi All,

Seen a few similar questions like JavaScript to trigger form validation rules by people like Johnny Kwok but i don't see any resolutions.

I have some buttons for "Next" and "Previous" to move me between tabs.

These buttons call something like the following function:

function goStep(stepNumber)
{
var hiddenTxtBox = NWF$("#"+hiddenTxtBoxId);
hiddenTxtBox.val(stepNumber);
NWF.FormFiller.Functions.ProcessOnChange(hiddenTxtBox);
}

Can I modify these functions to include a validation check prior to firing the move to another tab?

P.S. Out of curiosity, what is the point of the "causes validation" flag in the button control settings if it doesn't actually cause validation? What is it validating?

thanks

0 Kudos
Reply
2 Replies
Highlighted
bashyarajan
Nintex Newbie

Re: Validation Rules on Button JS

Jump to solution

Hi Dave,

      Yes ,you can have simple button and have their JavaScript Client ID having some JavaScript Function Call(). Define that JavaScript Function under your Custom JavaScript Section of Nintex Form Settings.i.e write your JavaScript function which validates the fields(controls) in the TAB.. Upon clicking on the button , the JS function fires and your validations should happen. Hope you got my point ! Please have a look into this Custom Validation for Nintex Forms  . 

nintex form validation‌ nintexforms‌ javascript validation‌ custom development‌ form validation‌.

You can also use the validation setting for particular form fields. Or try with Nintex form validation rules.   ..

Thanks

Bashya Rajan A

Reply
MegaJerk
Nintex Newbie

Re: Validation Rules on Button JS

Jump to solution

I made a response about validating (whenever) over on the thread you linked. 

https://community.nintex.com/thread/11554#comment-60326 

I can come up with a code example later on, but just rolling it around in my head, I'd guess that you could use the 

Page_ClientValidate();

code to invoke the validation for all fields when you try to change tabs, and then check the fields on the current tab for validity before either letting the tab change resolve or stopping it and showing errors. 


Reply