AnsweredAssumed Answered

Javascript to do save and force validation on specific fields

Question asked by cmikhaiel on Jul 10, 2018
Latest reply on Aug 21, 2018 by N M

I have a single form that contains multiple questions and sections. 

We have placed each question in a panel, and we show and hide each panel when the user selects tabs (radio buttons rendered as buttons) . 




The "Next" and "Previous" buttons basically move from one tab to the other. So if you are at question 1, and click Next, a javascript will run and show the next question(#2) and so on. 


The Javascript is something like this. 


function GoToQ2 ()


 NWF$('#'+ formTabs).find('input:radio[value="2"]').prop("checked","true").change();
return false;



We need that "Next" button to do validation (and possibly save and continue as well) of the questions.

The tricky part is want to do validation only for the current tab before it moves on to the next question.Is it possible to do partial validation given that all of them are technically on the same form ?!

How can we do that, and can we cause validation only on specific rules on each button?