Form Wizard

Developer
Size
2,857 Kb
Views
28,336

How do I make an form wizard?

What is a form wizard? How do you make a form wizard? This script and codes were developed by Parth Viroja on 03 September 2022, Saturday.

Form Wizard Previews

Form Wizard - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Form Wizard</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel='stylesheet prefetch' href='http://getbootstrap.com/dist/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <div class="well" style="margin-top:50px;"> <div class="wizard col-lg-12"> <div class="wizard-row steps"> <div class="wizard-step"> <a href="#step-1" type="button" class="btn btn-primary btn-circle">1</a> <p>Tour Information</p> </div> <div class="wizard-step"> <a href="#step-2" type="button" class="btn btn-default btn-circle disabled">2</a> <p>Personal Information</p> </div> <div class="wizard-step"> <a href="#step-3" type="button" class="btn btn-default btn-circle disabled">3</a> <p>Additional Information</p> </div> </div> </div> <fieldset> <legend></legend> <form role="form" action="" method="post"> <div class="row step-content" id="step-1"> <div class="col-md-12"> <div class="form-group"> <label class="control-label">First Name</label> <input maxlength="100" type="text" required="required" class="form-control" placeholder="Enter First Name" /> </div> <button class="btn btn-primary nextBtn pull-right" type="button">Next</button> </div> </div> <div class="row step-content" id="step-2"> <div class="col-md-12"> <div class="form-group"> <label class="control-label">Company Name</label> <input maxlength="200" type="text" required="required" class="form-control" placeholder="Enter Company Name" /> </div> <button class="btn btn-primary nextBtn pull-right" type="button">Next</button> </div> </div> <div class="row step-content" id="step-3"> <div class="col-md-12"> <button class="btn btn-success pull-right" type="submit">Submit</button> </div> </div> </form> </fieldset> </div>
</div> <script src='http://getbootstrap.com/dist/js/bootstrap.js'></script>
<script src='http://code.jquery.com/jquery-2.2.0.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Form Wizard - Script Codes CSS Codes

body{ font-family:'Calibri'; font-size:14px; letter-spacing:1px;
}
.wizard-step p { margin-top: 10px;
}
.wizard-row { display:table-row;
}
.wizard { display: table; width:100%; position: relative; margin-top:-50px;
}
.wizard-step .disabled{ opacity:1; color:#ccc; background:#efefef;
}
.wizard-row:before { top:30px; bottom: 0; position: absolute; content: " "; width: 100%; height: 1px; background-color: #ccc; z-order: 0;
}
.wizard-step { display: table-cell; text-align: center; position: relative;
}
.btn-circle { width:60px; height:60px; text-align: center; font-size:20px; font-weight:lighter; line-height:44px; border-radius:50%;
}

Form Wizard - Script Codes JS Codes

$(document).ready(function() { var steps_link = $('div.steps div a'), steps_contents = $('.step-content'), nexts = $('.nextBtn'); steps_contents.hide(); steps_link.click(function(e) { e.preventDefault(); var $target = $($(this).attr('href')), $item = $(this); if (!$item.hasClass('disabled')) { steps_link.removeClass('btn-primary').addClass('btn-default'); $item.addClass('btn-primary'); steps_contents.hide(); $target.show(); $target.find('input:eq(0)').focus(); } }); nexts.click(function() { var curStep = $(this).closest(".step-content"), curStepBtn = curStep.attr("id"), nextwizard = $('div.steps div a[href="#' + curStepBtn + '"]').parent().next().children("a"), curInputs = curStep.find("input[type='text'],input[type='url']"), isValid = true; $(".form-group").removeClass("has-error"); for (var i = 0; i < curInputs.length; i++) { if (!curInputs[i].validity.valid) { isValid = false; $(curInputs[i]).closest(".form-group").addClass("has-error"); } } if (isValid) { nextwizard.removeClass('disabled').trigger('click'); } }); $('div.steps div a.btn-primary').trigger('click');
});
Form Wizard - Script Codes
Form Wizard - Script Codes
Home Page Home
Developer Parth Viroja
Username parthviroja
Uploaded September 03, 2022
Rating 3
Size 2,857 Kb
Views 28,336
Do you need developer help for Form Wizard?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Parth Viroja (parthviroja) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!