// ON LOAD Smart wizard
// Smart Wizard
$('#wizard').smartWizard({
    onLeaveStep: leaveAStepCallback,
    onFinish: onFinishCallback,
});

function leaveAStepCallback(obj, context) {
    return validateSteps(context.fromStep);
}

function onFinishCallback(objs, context) {
    if (validateAllSteps()) {
        $('#vendorSubmissionForm').submit();
    }
}

// Your Step validation logic
function validateSteps(stepnumber) {
    return true;
}

// Final submit
function validateAllSteps() {
    return true;
}