Step Forms
Create a multi-step form to get more leads and increase engagement.
How to use
Copy-paste the following <script>
near the end of your pages under JS Implementing Plugins to enable it.
<script src="../assets/vendor/hs-step-form/dist/hs-step-form.min.js"></script>
Copy-paste the init function under JS Plugins Init., before the closing </body>
tag, to enable it.
<script>
$(document).on('ready', function () {
// initialization of step form
$('.js-step-form').each(function () {
var stepForm = new HSStepForm($(this)).init();
});
});
</script>
Basic example
<!-- Step Form -->
<form class="js-step-form"
data-hs-step-form-options='{
"progressSelector": "#basicStepFormProgress",
"stepsSelector": "#basicStepFormContent",
"endSelector": "#createProjectFinishBtn"
}'>
<!-- Step -->
<ul id="basicStepFormProgress" class="js-step-progress step step-sm step-icon-sm step-inline step-item-between mb-7">
<li class="step-item">
<a class="step-content-wrapper" href="javascript:;"
data-hs-step-form-next-options='{
"targetSelector": "#basicStepDetails"
}'>
<span class="step-icon step-icon-soft-dark">1</span>
<div class="step-content">
<span class="step-title">Details</span>
</div>
</a>
</li>
<li class="step-item">
<a class="step-content-wrapper" href="javascript:;"
data-hs-step-form-next-options='{
"targetSelector": "#basicStepTerms"
}'>
<span class="step-icon step-icon-soft-dark">2</span>
<div class="step-content">
<span class="step-title">Terms</span>
</div>
</a>
</li>
<li class="step-item">
<a class="step-content-wrapper" href="javascript:;"
data-hs-step-form-next-options='{
"targetSelector": "#basicStepMembers"
}'>
<span class="step-icon step-icon-soft-dark">3</span>
<div class="step-content">
<span class="step-title">Members</span>
</div>
</a>
</li>
</ul>
<!-- End Step -->
<!-- Content Step Form -->
<div id="basicStepFormContent">
<div id="basicStepDetails" class="active">
<h4>Details content</h4>
<p>...</p>
<!-- Footer -->
<div class="d-flex align-items-center">
<div class="ml-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#basicStepTerms"
}'>
Next <i class="tio-chevron-right"></i>
</button>
</div>
</div>
<!-- End Footer -->
</div>
<div id="basicStepTerms" style="display: none;">
<h4>Terms content</h4>
<p>...</p>
<!-- Footer -->
<div class="d-flex align-items-center">
<button type="button" class="btn btn-ghost-secondary mr-2"
data-hs-step-form-prev-options='{
"targetSelector": "#basicStepDetails"
}'>
<i class="tio-chevron-left"></i> Previous step
</button>
<div class="ml-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#basicStepMembers"
}'>
Next <i class="tio-chevron-right"></i>
</button>
</div>
</div>
<!-- End Footer -->
</div>
<div id="basicStepMembers" style="display: none;">
<h4>Members content</h4>
<p>...</p>
<!-- Footer -->
<div class="d-sm-flex align-items-center">
<button type="button" class="btn btn-ghost-secondary mb-3 mb-sm-0 mr-2"
data-hs-step-form-prev-options='{
"targetSelector": "#basicStepTerms"
}'>
<i class="tio-chevron-left"></i> Previous step
</button>
<div class="d-flex justify-content-end ml-auto">
<button type="button" class="btn btn-white mr-2" data-dismiss="modal" aria-label="Close">Cancel</button>
<button id="createProjectFinishBtn" type="button" class="btn btn-primary">Create project</button>
</div>
</div>
<!-- End Footer -->
</div>
</div>
<!-- End Content Step Form -->
<!-- Message Body -->
<div id="basicStepSuccessMessage" style="display:none;">
<div class="text-center">
<img class="img-fluid mb-3" src="../assets/svg/illustrations/create.svg" alt="Image Description" style="max-width: 15rem;">
<div class="mb-4">
<h2>Successful!</h2>
<p>New project has been successfully created.</p>
</div>
<div class="d-flex justify-content-center">
<a class="btn btn-white mr-3" href="#">
<i class="tio-chevron-left ml-1"></i> Back to projects
</a>
<a class="btn btn-primary" href="#">
<i class="tio-city mr-1"></i> Add new project
</a>
</div>
</div>
</div>
<!-- End Message Body -->
</form>
<!-- End Step Form -->
<script>
$(document).on('ready', function () {
// initialization of step form
$('.js-step-form').each(function () {
var stepForm = new HSStepForm($(this), {
finish: function() {
$("#basicStepFormProgress").hide();
$("#basicStepFormContent").hide();
$("#basicStepSuccessMessage").show();
}
}).init();
});
});
</script>
Vertical steps
<!-- Step Form -->
<form class="js-step-form"
data-hs-step-form-options='{
"progressSelector": "#basicVerStepFormProgress",
"stepsSelector": "#basicVerStepFormContent",
"endSelector": "#basicVerStepFinishBtn"
}'>
<div class="row">
<div class="col-lg-3">
<!-- Step -->
<ul id="basicVerStepFormProgress" class="js-step-progress step step-icon-sm mb-7">
<li class="step-item">
<a class="step-content-wrapper" href="javascript:;"
data-hs-step-form-next-options='{
"targetSelector": "#basicVerStepDetails"
}'>
<span class="step-icon step-icon-soft-dark">1</span>
<div class="step-content pb-5">
<span class="step-title">Details</span>
</div>
</a>
</li>
<li class="step-item">
<a class="step-content-wrapper" href="javascript:;"
data-hs-step-form-next-options='{
"targetSelector": "#basicVerStepTerms"
}'>
<span class="step-icon step-icon-soft-dark">2</span>
<div class="step-content pb-5">
<span class="step-title">Terms</span>
</div>
</a>
</li>
<li class="step-item">
<a class="step-content-wrapper" href="javascript:;"
data-hs-step-form-next-options='{
"targetSelector": "#basicVerStepMembers"
}'>
<span class="step-icon step-icon-soft-dark">3</span>
<div class="step-content pb-5">
<span class="step-title">Members</span>
</div>
</a>
</li>
</ul>
<!-- End Step -->
</div>
<div class="col-lg-9">
<!-- Content Step Form -->
<div id="basicVerStepFormContent">
<div id="basicVerStepDetails" class="card card-body active" style="min-height: 15rem;">
<h4>Details content</h4>
<p>...</p>
<!-- Footer -->
<div class="d-flex align-items-center mt-auto">
<div class="ml-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#basicVerStepTerms"
}'>
Next <i class="tio-chevron-right"></i>
</button>
</div>
</div>
<!-- End Footer -->
</div>
<div id="basicVerStepTerms" class="card card-body" style="display: none; min-height: 15rem;">
<h4>Terms content</h4>
<p>...</p>
<!-- Footer -->
<div class="d-flex align-items-center mt-auto">
<button type="button" class="btn btn-ghost-secondary mr-2"
data-hs-step-form-prev-options='{
"targetSelector": "#basicVerStepDetails"
}'>
<i class="tio-chevron-left"></i> Previous step
</button>
<div class="ml-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#basicVerStepMembers"
}'>
Next <i class="tio-chevron-right"></i>
</button>
</div>
</div>
<!-- End Footer -->
</div>
<div id="basicVerStepMembers" class="card card-body" style="display: none; min-height: 15rem;">
<h4>Members content</h4>
<p>...</p>
<!-- Footer -->
<div class="d-sm-flex align-items-center mt-auto">
<button type="button" class="btn btn-ghost-secondary mb-3 mb-sm-0 mr-2"
data-hs-step-form-prev-options='{
"targetSelector": "#basicVerStepTerms"
}'>
<i class="tio-chevron-left"></i> Previous step
</button>
<div class="d-flex justify-content-end ml-auto">
<button type="button" class="btn btn-white mr-2" data-dismiss="modal" aria-label="Close">Cancel</button>
<button id="basicVerStepFinishBtn" type="button" class="btn btn-primary">Create project</button>
</div>
</div>
<!-- End Footer -->
</div>
</div>
<!-- End Content Step Form -->
</div>
</div>
<!-- End Row -->
<!-- Message Body -->
<div id="basicVerStepSuccessMessage" style="display:none;">
<div class="text-center">
<img class="img-fluid mb-3" src="../assets/svg/illustrations/create.svg" alt="Image Description" style="max-width: 15rem;">
<div class="mb-4">
<h2>Successful!</h2>
<p>New project has been successfully created.</p>
</div>
<div class="d-flex justify-content-center">
<a class="btn btn-white mr-3" href="#">
<i class="tio-chevron-left ml-1"></i> Back to projects
</a>
<a class="btn btn-primary" href="#">
<i class="tio-city mr-1"></i> Add new project
</a>
</div>
</div>
</div>
<!-- End Message Body -->
</form>
<!-- End Step Form -->
<script>
$(document).on('ready', function () {
// initialization of step form
$('.js-step-form').each(function () {
var stepForm = new HSStepForm($(this), {
finish: function() {
$("#basicVerStepFormProgress").hide();
$("#basicVerStepFormContent").hide();
$("#basicVerStepSuccessMessage").show();
}
}).init();
});
});
</script>
Basic form example
<!-- Step Form -->
<form class="js-step-form"
data-hs-step-form-options='{
"progressSelector": "#basicFormProgress",
"stepsSelector": "#basicFormContent",
"endSelector": "#basicFormFinishBtn"
}'>
<!-- Step -->
<ul id="basicFormProgress" class="js-step-progress step step-sm step-icon-sm step-inline step-item-between mb-7">
<li class="step-item">
<a class="step-content-wrapper" href="javascript:;"
data-hs-step-form-next-options='{
"targetSelector": "#basicFormAccount"
}'>
<span class="step-icon step-icon-soft-dark">1</span>
<div class="step-content">
<span class="step-title">Account</span>
</div>
</a>
</li>
<li class="step-item">
<a class="step-content-wrapper" href="javascript:;"
data-hs-step-form-next-options='{
"targetSelector": "#basicFormProfile"
}'>
<span class="step-icon step-icon-soft-dark">2</span>
<div class="step-content">
<span class="step-title">Profile</span>
</div>
</a>
</li>
<li class="step-item">
<a class="step-content-wrapper" href="javascript:;"
data-hs-step-form-next-options='{
"targetSelector": "#basicFormAddress"
}'>
<span class="step-icon step-icon-soft-dark">3</span>
<div class="step-content">
<span class="step-title">Address</span>
</div>
</a>
</li>
</ul>
<!-- End Step -->
<!-- Content Step Form -->
<div id="basicFormContent">
<div id="basicFormAccount" class="active">
<!-- Form Group -->
<div class="row form-group">
<label for="currentPasswordLabel" class="col-sm-3 col-form-label input-label">Username</label>
<div class="col-sm-9">
<input type="password" class="form-control" name="username" id="usernameLabel" placeholder="Username" aria-label="Username">
</div>
</div>
<!-- End Form Group -->
<!-- Form Group -->
<div class="row form-group">
<label for="currentPasswordLabel" class="col-sm-3 col-form-label input-label">New password</label>
<div class="col-sm-9">
<input type="password" class="form-control" name="newPassword" id="newPasswordLabel" placeholder="New password" aria-label="New password">
</div>
</div>
<!-- End Form Group -->
<!-- Form Group -->
<div class="row form-group">
<label for="currentPasswordLabel" class="col-sm-3 col-form-label input-label">Current password</label>
<div class="col-sm-9">
<input type="password" class="form-control" name="currentPassword" id="currentPasswordLabel" placeholder="Current password" aria-label="Current password">
</div>
</div>
<!-- End Form Group -->
<!-- Footer -->
<div class="d-flex align-items-center">
<div class="ml-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#basicFormProfile"
}'>
Next <i class="tio-chevron-right"></i>
</button>
</div>
</div>
<!-- End Footer -->
</div>
<div id="basicFormProfile" style="display: none;">
<!-- Form Group -->
<div class="row form-group">
<label for="currentPasswordLabel" class="col-sm-3 col-form-label input-label">First name</label>
<div class="col-sm-9">
<input type="password" class="form-control" name="firstName" id="firstNameLabel" placeholder="First name" aria-label="First name">
</div>
</div>
<!-- End Form Group -->
<!-- Form Group -->
<div class="row form-group">
<label for="currentPasswordLabel" class="col-sm-3 col-form-label input-label">Last name</label>
<div class="col-sm-9">
<input type="password" class="form-control" name="lastName" id="lastNameLabel" placeholder="Last name" aria-label="Last name">
</div>
</div>
<!-- End Form Group -->
<!-- Form Group -->
<div class="row form-group">
<label for="currentPasswordLabel" class="col-sm-3 col-form-label input-label">Email</label>
<div class="col-sm-9">
<input type="password" class="form-control" name="email" id="emailLabel" placeholder="Email address" aria-label="Email address">
</div>
</div>
<!-- End Form Group -->
<!-- Footer -->
<div class="d-flex align-items-center">
<button type="button" class="btn btn-ghost-secondary mr-2"
data-hs-step-form-prev-options='{
"targetSelector": "#basicFormAccount"
}'>
<i class="tio-chevron-left"></i> Previous step
</button>
<div class="ml-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#basicFormAddress"
}'>
Next <i class="tio-chevron-right"></i>
</button>
</div>
</div>
<!-- End Footer -->
</div>
<div id="basicFormAddress" style="display: none;">
<!-- Form Group -->
<div class="row form-group">
<label for="currentPasswordLabel" class="col-sm-3 col-form-label input-label">Address 1</label>
<div class="col-sm-9">
<input type="password" class="form-control" name="address1" id="address1Label" placeholder="Address 1" aria-label="Address 1">
</div>
</div>
<!-- End Form Group -->
<!-- Form Group -->
<div class="row form-group">
<label for="currentPasswordLabel" class="col-sm-3 col-form-label input-label">Address 2 <span class="input-label-secondary">(Optional)</span></label>
<div class="col-sm-9">
<input type="password" class="form-control" name="address2" id="address2Label" placeholder="Address 2" aria-label="Address 2">
</div>
</div>
<!-- End Form Group -->
<!-- Footer -->
<div class="d-sm-flex align-items-center">
<button type="button" class="btn btn-ghost-secondary mb-3 mb-sm-0 mr-2"
data-hs-step-form-prev-options='{
"targetSelector": "#basicFormProfile"
}'>
<i class="tio-chevron-left"></i> Previous step
</button>
<div class="d-flex justify-content-end ml-auto">
<button type="button" class="btn btn-white mr-2" data-dismiss="modal" aria-label="Close">Cancel</button>
<button id="basicFormFinishBtn" type="button" class="btn btn-primary">Save Changes</button>
</div>
</div>
<!-- End Footer -->
</div>
</div>
<!-- End Content Step Form -->
<!-- Message Body -->
<div id="basicFormSuccessMessage" style="display:none;">
<div class="text-center">
<img class="img-fluid mb-3" src="../assets/svg/illustrations/create.svg" alt="Image Description" style="max-width: 15rem;">
<div class="mb-4">
<h2>Successful!</h2>
<p>Your changes have been successfully saved.</p>
</div>
<div class="d-flex justify-content-center">
<a class="btn btn-white mr-3" href="#">
<i class="tio-chevron-left ml-1"></i> Back to projects
</a>
<a class="btn btn-primary" href="#">
<i class="tio-city mr-1"></i> Add new project
</a>
</div>
</div>
</div>
<!-- End Message Body -->
</form>
<!-- Step Form -->
<script>
$(document).on('ready', function () {
// initialization of step form
$('.js-step-form').each(function () {
var stepForm = new HSStepForm($(this), {
finish: function() {
$("#basicFormProgress").hide();
$("#basicFormContent").hide();
$("#basicFormSuccessMessage").show();
}
}).init();
});
});
</script>
Validation form
<!-- Step Form -->
<form class="js-step-form js-validate"
data-hs-step-form-options='{
"progressSelector": "#validationFormProgress",
"stepsSelector": "#validationFormContent",
"endSelector": "#validationFormFinishBtn",
"isValidate": true
}'>
<!-- Step -->
<ul id="validationFormProgress" class="js-step-progress step step-sm step-icon-sm step-inline step-item-between mb-7">
<li class="step-item">
<a class="step-content-wrapper" href="javascript:;"
data-hs-step-form-next-options='{
"targetSelector": "#validationFormAccount"
}'>
<span class="step-icon step-icon-soft-dark">1</span>
<div class="step-content">
<span class="step-title">Account</span>
</div>
</a>
</li>
<li class="step-item">
<a class="step-content-wrapper" href="javascript:;"
data-hs-step-form-next-options='{
"targetSelector": "#validationFormProfile"
}'>
<span class="step-icon step-icon-soft-dark">2</span>
<div class="step-content">
<span class="step-title">Profile</span>
</div>
</a>
</li>
<li class="step-item">
<a class="step-content-wrapper" href="javascript:;"
data-hs-step-form-next-options='{
"targetSelector": "#validationFormAddress"
}'>
<span class="step-icon step-icon-soft-dark">3</span>
<div class="step-content">
<span class="step-title">Address</span>
</div>
</a>
</li>
</ul>
<!-- End Step -->
<!-- Content Step Form -->
<div id="validationFormContent">
<div id="validationFormAccount" class="active">
<!-- Form Group -->
<div class="row form-group">
<label for="validationFormUsernameLabel" class="col-sm-3 col-form-label input-label">Username</label>
<div class="col-sm-9">
<div class="js-form-message">
<input type="password" class="form-control" name="username" id="validationFormUsernameLabel" placeholder="Username" aria-label="Username" required data-msg="Please enter your username.">
</div>
</div>
</div>
<!-- End Form Group -->
<!-- Form Group -->
<div class="row form-group">
<label for="validationFormNewPasswordLabel" class="col-sm-3 col-form-label input-label">New password</label>
<div class="col-sm-9">
<div class="js-form-message">
<input type="password" class="form-control" name="newPassword" id="validationFormNewPasswordLabel" placeholder="New password" aria-label="New password" required data-msg="Your password is invalid. Please try again.">
</div>
</div>
</div>
<!-- End Form Group -->
<!-- Form Group -->
<div class="row form-group">
<label for="validationFormCurrentPasswordLabel" class="col-sm-3 col-form-label input-label">Current password</label>
<div class="col-sm-9">
<div class="js-form-message">
<input type="password" class="form-control" name="currentPassword" id="validationFormCurrentPasswordLabel" placeholder="Current password" aria-label="Current password" required data-msg="Password does not match the confirm password.">
</div>
</div>
</div>
<!-- End Form Group -->
<!-- Footer -->
<div class="d-flex align-items-center">
<div class="ml-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#validationFormProfile"
}'>
Next <i class="tio-chevron-right"></i>
</button>
</div>
</div>
<!-- End Footer -->
</div>
<div id="validationFormProfile" style="display: none;">
<!-- Form Group -->
<div class="row form-group">
<label for="validationFormFirstNameLabel" class="col-sm-3 col-form-label input-label">First name</label>
<div class="col-sm-9">
<div class="js-form-message">
<input type="password" class="form-control" name="firstName" id="validationFormFirstNameLabel" placeholder="First name" aria-label="First name" required data-msg="Please enter your first name.">
</div>
</div>
</div>
<!-- End Form Group -->
<!-- Form Group -->
<div class="row form-group">
<label for="validationFormLastNameLabel" class="col-sm-3 col-form-label input-label">Last name</label>
<div class="col-sm-9">
<div class="js-form-message">
<input type="password" class="form-control" name="lastName" id="validationFormLastNameLabel" placeholder="Last name" aria-label="Last name" required data-msg="Please enter your last name.">
</div>
</div>
</div>
<!-- End Form Group -->
<!-- Form Group -->
<div class="row form-group">
<label for="validationFormEmailLabel" class="col-sm-3 col-form-label input-label">Email</label>
<div class="col-sm-9">
<div class="js-form-message">
<input type="password" class="form-control" name="email" id="validationFormEmailLabel" placeholder="Email address" aria-label="Email address" required data-msg="Please enter a valid email address.">
</div>
</div>
</div>
<!-- End Form Group -->
<!-- Footer -->
<div class="d-flex align-items-center">
<button type="button" class="btn btn-ghost-secondary mr-2"
data-hs-step-form-prev-options='{
"targetSelector": "#validationFormAccount"
}'>
<i class="tio-chevron-left"></i> Previous step
</button>
<div class="ml-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#validationFormAddress"
}'>
Next <i class="tio-chevron-right"></i>
</button>
</div>
</div>
<!-- End Footer -->
</div>
<div id="validationFormAddress" style="display: none;">
<!-- Form Group -->
<div class="row form-group">
<label for="validationFormAddress1Label" class="col-sm-3 col-form-label input-label">Address 1</label>
<div class="col-sm-9">
<div class="js-form-message">
<input type="password" class="form-control" name="address1" id="validationFormAddress1Label" placeholder="Address 1" aria-label="Address 1" required data-msg="Please enter your address.">
</div>
</div>
</div>
<!-- End Form Group -->
<!-- Form Group -->
<div class="row form-group">
<label for="validationFormAddress2Label" class="col-sm-3 col-form-label input-label">Address 2 <span class="input-label-secondary">(Optional)</span></label>
<div class="col-sm-9">
<input type="password" class="form-control" name="address2" id="validationFormAddress2Label" placeholder="Address 2" aria-label="Address 2">
</div>
</div>
<!-- End Form Group -->
<!-- Footer -->
<div class="d-sm-flex align-items-center">
<button type="button" class="btn btn-ghost-secondary mb-3 mb-sm-0 mr-2"
data-hs-step-form-prev-options='{
"targetSelector": "#validationFormProfile"
}'>
<i class="tio-chevron-left"></i> Previous step
</button>
<div class="d-flex justify-content-end ml-auto">
<button type="button" class="btn btn-white mr-2" data-dismiss="modal" aria-label="Close">Cancel</button>
<button id="validationFormFinishBtn" type="button" class="btn btn-primary">Save Changes</button>
</div>
</div>
<!-- End Footer -->
</div>
</div>
<!-- End Content Step Form -->
<!-- Message Body -->
<div id="validationFormSuccessMessage" style="display:none;">
<div class="text-center">
<img class="img-fluid mb-3" src="../assets/svg/illustrations/create.svg" alt="Image Description" style="max-width: 15rem;">
<div class="mb-4">
<h2>Successful!</h2>
<p>Your changes have been successfully saved.</p>
</div>
<div class="d-flex justify-content-center">
<a class="btn btn-white mr-3" href="#">
<i class="tio-chevron-left ml-1"></i> Back to projects
</a>
<a class="btn btn-primary" href="#">
<i class="tio-city mr-1"></i> Add new project
</a>
</div>
</div>
</div>
<!-- End Message Body -->
</form>
<!-- End Step Form -->
<!-- JS Implementing Plugins -->
<script src="../node_modules/jquery-validation/dist/jquery.validate.min.js"></script>
<!-- JS Front -->
<script src="../assets/js/hs.validation.js"></script>
<script>
$(document).on('ready', function () {
// initialization of form validation
$('.js-validate').each(function() {
$.HSCore.components.HSValidation.init($(this));
});
// initialization of step form
$('.js-step-form').each(function () {
var stepForm = new HSStepForm($(this), {
finish: function() {
$("#validationFormProgress").hide();
$("#validationFormContent").hide();
$("#validationFormSuccessMessage").show();
}
}).init();
});
});
</script>
Modal example
Step form
<!-- Button Trigger Modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
Open modal
</button>
<!-- End Button Trigger Modal -->
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<!-- Header -->
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Step form</h5>
<button type="button" class="btn btn-icon btn-sm btn-ghost-secondary" data-dismiss="modal" aria-label="Close">
<i class="tio-clear tio-lg" aria-hidden="true"></i>
</button>
</div>
<!-- End Header -->
<!-- Body -->
<div class="modal-body">
<!-- Step Form -->
<form class="js-step-form"
data-hs-step-form-options='{
"progressSelector": "#modalStepFormProgress",
"stepsSelector": "#modalStepFormContent",
"endSelector": "#createProjectFinishBtn"
}'>
<!-- Step -->
<ul id="modalStepFormProgress" class="js-step-progress step step-sm step-icon-sm step-inline step-item-between mb-7">
<li class="step-item">
<a class="step-content-wrapper" href="javascript:;"
data-hs-step-form-next-options='{
"targetSelector": "#modalStepDetails"
}'>
<span class="step-icon step-icon-soft-dark">1</span>
<div class="step-content">
<span class="step-title">Details</span>
</div>
</a>
</li>
<li class="step-item">
<a class="step-content-wrapper" href="javascript:;"
data-hs-step-form-next-options='{
"targetSelector": "#modalStepTerms"
}'>
<span class="step-icon step-icon-soft-dark">2</span>
<div class="step-content">
<span class="step-title">Terms</span>
</div>
</a>
</li>
<li class="step-item">
<a class="step-content-wrapper" href="javascript:;"
data-hs-step-form-next-options='{
"targetSelector": "#modalStepMembers"
}'>
<span class="step-icon step-icon-soft-dark">3</span>
<div class="step-content">
<span class="step-title">Members</span>
</div>
</a>
</li>
</ul>
<!-- End Step -->
<!-- Content Step Form -->
<div id="modalStepFormContent">
<div id="modalStepDetails" class="active">
<h4>Details content</h4>
<p>...</p>
<!-- Footer -->
<div class="d-flex align-items-center">
<div class="ml-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#modalStepTerms"
}'>
Next <i class="tio-chevron-right"></i>
</button>
</div>
</div>
<!-- End Footer -->
</div>
<div id="modalStepTerms" style="display: none;">
<h4>Terms content</h4>
<p>...</p>
<!-- Footer -->
<div class="d-flex align-items-center">
<button type="button" class="btn btn-ghost-secondary mr-2"
data-hs-step-form-prev-options='{
"targetSelector": "#modalStepDetails"
}'>
<i class="tio-chevron-left"></i> Previous step
</button>
<div class="ml-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#modalStepMembers"
}'>
Next <i class="tio-chevron-right"></i>
</button>
</div>
</div>
<!-- End Footer -->
</div>
<div id="modalStepMembers" style="display: none;">
<h4>Members content</h4>
<p>...</p>
<!-- Footer -->
<div class="d-sm-flex align-items-center">
<button type="button" class="btn btn-ghost-secondary mb-3 mb-sm-0 mr-2"
data-hs-step-form-prev-options='{
"targetSelector": "#modalStepTerms"
}'>
<i class="tio-chevron-left"></i> Previous step
</button>
<div class="d-flex justify-content-end ml-auto">
<button type="button" class="btn btn-white mr-2" data-dismiss="modal" aria-label="Close">Cancel</button>
<button id="createProjectFinishBtn" type="button" class="btn btn-primary">Create project</button>
</div>
</div>
<!-- End Footer -->
</div>
</div>
<!-- End Content Step Form -->
<!-- Message Body -->
<div id="modalStepSuccessMessage" style="display:none;">
<div class="text-center">
<img class="img-fluid mb-3" src="../assets/svg/illustrations/create.svg" alt="Image Description" style="max-width: 15rem;">
<div class="mb-4">
<h2>Successful!</h2>
<p>New project has been successfully created.</p>
</div>
<div class="d-flex justify-content-center">
<a class="btn btn-white mr-3" href="#">
<i class="tio-chevron-left ml-1"></i> Back to projects
</a>
<a class="btn btn-primary" href="#">
<i class="tio-city mr-1"></i> Add new project
</a>
</div>
</div>
</div>
<!-- End Message Body -->
</form>
<!-- End Step Form -->
</div>
<!-- End Body -->
<!-- Footer -->
<div class="modal-footer">
<button type="button" class="btn btn-white" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Continue</button>
</div>
<!-- End Footer -->
</div>
</div>
</div>
<!-- End Modal -->
Methods
Parameters | Description | Default value |
---|---|---|
|
A selector that contains a block with progress in the form of numbered or text identifiers of a specific form | null |
|
ID of the block that contains the blocks with steps | null |
|
Selector, when clicked, the transition to the next step will be carried out | '[data-hs-step-form-next-options]' |
|
Selector, when clicked, the transition to the previous step will be carried out | '[data-hs-step-form-prev-options]' |
|
If true, then includes field validation at each step, according to the rules of the jquery.validation plugin |
false |
|
Class that will be given to the element of progress with an active step | 'active' |
|
Will be add to step item if validation has errors | 'is-invalid' |
|
Class to be given to the validated progress element | 'checked' |
|
Сlass that should be added to .step-item if the step container has a required field |
.js-step-required |