How can I validate each step of a fuelux wizard (when clicking next button)?
jquery code for the function is like this.
$('#myWizard').on('actionclicked.fu.wizard', function (evt, data) {
// validation code for the step here.
// jquery validator, AFAIK validates only the whole form.
// in this case, only the ancestor div
// had tried this
var curstep = $('#myWizard').wizard('selectedItem');
var curstepcontainer = $(this).closest(".step-pane");
curstepcontainer.validate();
// and this
if (curstep.step === 1)
{
$('#field1').validate();
$('#field2').validate();
}
});
Both didnt work.
While this approach may be a way to make it work, Is there any other ideal way to do this?
I understand from https://collegeparktutors.com/get-tutor?course_dropdown=19 that this can be done.
Have also checked out formvalidation.io (http://formvalidation.io/examples/fuel-ux-wizard/) that they have a great working code for this, which solves our issue. However, this is a commercial product, and we are exploring open source / free tools :-)
Any pointers, help, suggestions appreciated! Thanks!