Step Forms (Wizard)
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>
<script>
(function() {
// INITIALIZATION OF STEP FORM
// =======================================================
new HSStepForm('.js-step-form', {
finish ($el) {
const $successMessageTempalte = $el.querySelector('.js-success-message').cloneNode(true)
$successMessageTempalte.style.display = 'block'
$el.style.display = 'none'
$el.parentElement.appendChild($successMessageTempalte)
}
})
});
</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="ms-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#basicStepTerms"
}'>
Next <i class="bi-chevron-right small"></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 me-2"
data-hs-step-form-prev-options='{
"targetSelector": "#basicStepDetails"
}'>
<i class="bi-chevron-left small"></i> Previous step
</button>
<div class="ms-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#basicStepMembers"
}'>
Next <i class="bi-chevron-right small"></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 me-2"
data-hs-step-form-prev-options='{
"targetSelector": "#basicStepTerms"
}'>
<i class="bi-chevron-left small"></i> Previous step
</button>
<div class="d-flex justify-content-end ms-auto">
<button type="button" class="btn btn-white me-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" class="js-success-message" style="display:none;">
<div class="text-center">
<img class="img-fluid mb-3" src="../assets/svg/illustrations/oc-hi-five.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 gap-3">
<a class="btn btn-white" href="#">
<i class="bi-chevron-left small ms-1"></i> Back to projects
</a>
<a class="btn btn-primary" href="#">
<i class="tio-city me-1"></i> Add new project
</a>
</div>
</div>
</div>
<!-- End Message Body -->
</form>
<!-- End Step Form -->
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="ms-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#basicVerStepTerms"
}'>
Next <i class="bi-chevron-right small"></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 me-2"
data-hs-step-form-prev-options='{
"targetSelector": "#basicVerStepDetails"
}'>
<i class="bi-chevron-left small"></i> Previous step
</button>
<div class="ms-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#basicVerStepMembers"
}'>
Next <i class="bi-chevron-right small"></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 me-2"
data-hs-step-form-prev-options='{
"targetSelector": "#basicVerStepTerms"
}'>
<i class="bi-chevron-left small"></i> Previous step
</button>
<div class="d-flex justify-content-end ms-auto">
<button type="button" class="btn btn-white me-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" class="js-success-message" style="display:none;">
<div class="text-center">
<img class="img-fluid mb-3" src="../assets/svg/illustrations/oc-hi-five.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 me-3" href="#">
<i class="bi-chevron-left small ms-1"></i> Back to projects
</a>
<a class="btn btn-primary" href="#">
<i class="tio-city me-1"></i> Add new project
</a>
</div>
</div>
</div>
<!-- End Message Body -->
</form>
<!-- End Step Form -->
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 mb-4">
<label for="currentPasswordLabel" class="col-sm-3 col-form-label form-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 mb-4">
<label for="currentPasswordLabel" class="col-sm-3 col-form-label form-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 mb-4">
<label for="currentPasswordLabel" class="col-sm-3 col-form-label form-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="ms-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#basicFormProfile"
}'>
Next <i class="bi-chevron-right small"></i>
</button>
</div>
</div>
<!-- End Footer -->
</div>
<div id="basicFormProfile" style="display: none;">
<!-- Form Group -->
<div class="row mb-4">
<label for="currentPasswordLabel" class="col-sm-3 col-form-label form-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 mb-4">
<label for="currentPasswordLabel" class="col-sm-3 col-form-label form-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 mb-4">
<label for="currentPasswordLabel" class="col-sm-3 col-form-label form-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 me-2"
data-hs-step-form-prev-options='{
"targetSelector": "#basicFormAccount"
}'>
<i class="bi-chevron-left small"></i> Previous step
</button>
<div class="ms-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#basicFormAddress"
}'>
Next <i class="bi-chevron-right small"></i>
</button>
</div>
</div>
<!-- End Footer -->
</div>
<div id="basicFormAddress" style="display: none;">
<!-- Form Group -->
<div class="row mb-4">
<label for="currentPasswordLabel" class="col-sm-3 col-form-label form-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 mb-4">
<label for="currentPasswordLabel" class="col-sm-3 col-form-label form-label">Address 2 <span class="form-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 me-2"
data-hs-step-form-prev-options='{
"targetSelector": "#basicFormProfile"
}'>
<i class="bi-chevron-left small"></i> Previous step
</button>
<div class="d-flex justify-content-end ms-auto">
<button type="button" class="btn btn-white me-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" class="js-success-message" style="display:none;">
<div class="text-center">
<img class="img-fluid mb-3" src="../assets/svg/illustrations/oc-hi-five.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 me-3" href="#">
<i class="bi-chevron-left small ms-1"></i> Back to projects
</a>
<a class="btn btn-primary" href="#">
<i class="tio-city me-1"></i> Add new project
</a>
</div>
</div>
</div>
<!-- End Message Body -->
</form>
<!-- End Step Form -->
Validation form
<!-- Step Form -->
<form class="js-step-form-validate 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 mb-4">
<label for="validationFormUsernameLabel" class="col-sm-3 col-form-label form-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.">
<span class="invalid-feedback">Please enter a valid username.</span>
</div>
</div>
</div>
<!-- End Form Group -->
<!-- Form Group -->
<div class="row mb-4">
<label for="validationFormNewPasswordLabel" class="col-sm-3 col-form-label form-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.">
<span class="invalid-feedback">Please enter a valid password.</span>
</div>
</div>
</div>
<!-- End Form Group -->
<!-- Form Group -->
<div class="row mb-4">
<label for="validationFormCurrentPasswordLabel" class="col-sm-3 col-form-label form-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.">
<span class="invalid-feedback">Please enter a valid current password.</span>
</div>
</div>
</div>
<!-- End Form Group -->
<!-- Footer -->
<div class="d-flex align-items-center">
<div class="ms-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#validationFormProfile"
}'>
Next <i class="bi-chevron-right small"></i>
</button>
</div>
</div>
<!-- End Footer -->
</div>
<div id="validationFormProfile" style="display: none;">
<!-- Form Group -->
<div class="row mb-4">
<label for="validationFormFirstNameLabel" class="col-sm-3 col-form-label form-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.">
<span class="invalid-feedback">Please enter a valid first name.</span>
</div>
</div>
</div>
<!-- End Form Group -->
<!-- Form Group -->
<div class="row mb-4">
<label for="validationFormLastNameLabel" class="col-sm-3 col-form-label form-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.">
<span class="invalid-feedback">Please enter a valid last name.</span>
</div>
</div>
</div>
<!-- End Form Group -->
<!-- Form Group -->
<div class="row mb-4">
<label for="validationFormEmailLabel" class="col-sm-3 col-form-label form-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.">
<span class="invalid-feedback">Please enter a valid email.</span>
</div>
</div>
</div>
<!-- End Form Group -->
<!-- Footer -->
<div class="d-flex align-items-center">
<button type="button" class="btn btn-ghost-secondary me-2"
data-hs-step-form-prev-options='{
"targetSelector": "#validationFormAccount"
}'>
<i class="bi-chevron-left small"></i> Previous step
</button>
<div class="ms-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#validationFormAddress"
}'>
Next <i class="bi-chevron-right small"></i>
</button>
</div>
</div>
<!-- End Footer -->
</div>
<div id="validationFormAddress" style="display: none;">
<!-- Form Group -->
<div class="row mb-4">
<label for="validationFormAddress1Label" class="col-sm-3 col-form-label form-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.">
<span class="invalid-feedback">Please enter a valid address.</span>
</div>
</div>
</div>
<!-- End Form Group -->
<!-- Form Group -->
<div class="row mb-4">
<label for="validationFormAddress2Label" class="col-sm-3 col-form-label form-label">Address 2 <span class="form-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 me-2"
data-hs-step-form-prev-options='{
"targetSelector": "#validationFormProfile"
}'>
<i class="bi-chevron-left small"></i> Previous step
</button>
<div class="d-flex justify-content-end ms-auto">
<button type="button" class="btn btn-white me-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" class="js-success-message" style="display:none;">
<div class="text-center">
<img class="img-fluid mb-3" src="../assets/svg/illustrations/oc-hi-five.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 me-3" href="#">
<i class="bi-chevron-left small ms-1"></i> Back to projects
</a>
<a class="btn btn-primary" href="#">
<i class="tio-city me-1"></i> Add new project
</a>
</div>
</div>
</div>
<!-- End Message Body -->
</form>
<!-- End Step Form -->
<!-- JS Front -->
<!-- JS Plugins Init. -->
<script>
(function() {
// INITIALIZATION OF STEP FORM
// =======================================================
new HSStepForm('.js-step-form-validate', {
validator: HSBsValidation.init('.js-validate'),
finish ($el) {
const $successMessageTempalte = $el.querySelector('.js-success-message').cloneNode(true)
$successMessageTempalte.style.display = 'block'
$el.style.display = 'none'
$el.parentElement.appendChild($successMessageTempalte)
}
})
})()
</script>
Modal example
Step Forms
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">Open modal</button>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Step Forms</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<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="ms-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#modalStepTerms"
}'>
Next <i class="bi-chevron-right small"></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 me-2"
data-hs-step-form-prev-options='{
"targetSelector": "#modalStepDetails"
}'>
<i class="bi-chevron-left small"></i> Previous step
</button>
<div class="ms-auto">
<button type="button" class="btn btn-primary"
data-hs-step-form-next-options='{
"targetSelector": "#modalStepMembers"
}'>
Next <i class="bi-chevron-right small"></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 me-2"
data-hs-step-form-prev-options='{
"targetSelector": "#modalStepTerms"
}'>
<i class="bi-chevron-left small"></i> Previous step
</button>
<div class="d-flex justify-content-end ms-auto">
<button type="button" class="btn btn-white me-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" class="js-success-message" style="display:none;">
<div class="text-center">
<img class="img-fluid mb-3" src="../assets/svg/illustrations/oc-hi-five.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 me-3" href="#">
<i class="bi-chevron-left small ms-1"></i> Back to projects
</a>
<a class="btn btn-primary" href="#">
<i class="tio-city me-1"></i> Add new project
</a>
</div>
</div>
</div>
<!-- End Message Body -->
</form>
<!-- End Step Form -->
</div>
</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' |
|
Class to be given to the focused progress element | 'focus' |
|
Сlass that should be added to .step-item if the step container has a required field |
.js-step-required |
|
Сalled after the last step | () => {} |
|
Сalled after going to the next step | () => {} |
|
Сalled after going to the previous step | () => {} |
|
Сalled before going to the next step. Return promise is required | () => {
return new Promise((resolve, reject) => {
resolve()
})
} |