I'm making a form based on this template: link
But I need validation done for the fields! You can not go to the next STEP until this validation.
I'm not finding a solution for this type of form, what form to validate?
I believe it is in the JS below where the onStepChanging call is made. But every change I tried, the move to the next step did not work.
$("#form-total").steps({
headerTag: "h2",
bodyTag: "section",
transitionEffect: "fade",
enableAllSteps: true,
autoFocus: true,
transitionEffectSpeed: 700,
titleTemplate : '<span class="title">#title#</span>',
labels: {
previous : 'Voltar',
next : 'Próximo',
finish : 'Enviar',
current : ''
},
onStepChanging: function (event, currentIndex, newIndex) {
var fullname = $('#first_name').val() + ' ' + $('#last_name').val();
var phone = $('#phone').val();
var email = $('#email').val();
var date = $('#date').val();
var time = $('#time').val();
$('#fullname-val').text(fullname);
$('#phone-val').text(phone);
$('#email-val').text(email);
$('#nota-val').text('Sua no foi '+nota+'!');
$('#date-val').text(date);
$('#time-val').text(time);
return true;
}
});