I haven't seen this question asked - though I did read probably 100 jQuery-steps about similar topics - none seemed to solve my issue.
I'm using jQuery-steps and would like to add a "reset" button after the first step is completed - in case my user wants to clear the form and start over. I would like this button to be incerted after the default "next" button.
This is my current script based on the default basic form here
$(function ()
{
function errorPlacement(error, element)
{
element.before(error);
}
$("#form").validate({
rules: {
zip: {
required: true,
maxlength:5,
minlength:5
},
phone: {
required: true,
minlength: 10,
phoneUS: true
}
}
});
$("#wizard").steps({
headerTag: "h3",
bodyTag: "section",
transitionEffect: "slideLeft",
onStepChanging: function (event, currentIndex, newIndex)
{
// Allways allow step back to the previous step even if the current step is not valid!
if (currentIndex > newIndex)
{
return false;
}
$("#form").validate().settings.ignore = ":disabled,:hidden";
return $("#form").valid();
},
onFinishing: function (event, currentIndex)
{
$("#form").validate().settings.ignore = ":disabled";
return $("#form").valid();
},
onFinished: function (event, currentIndex)
{
alert("Thank you! Your request has been sumbitted.");
}
});
});