FormValidation.io Hide back button when form is submitted KTStepper
How can I hide the back button from KTStepper?
if (stepperObj.getCurrentStepIndex() === 5). <- step after submit from step 4
when I'm on step 5 I dont want users to be able to go back to the form and re-submit, I don't see in the documentation how to hide it or disable it after the form is submitted, can anyone please help? Thanks
Replies (3)
Hi
,
Great! If you need any further help please do let us know.
Regards!
Your Support Matters!
Hi,
You can check this stepper example to use custom buttons for back and forward buttons.
We will need to do an enhancement in the next update to hide the built-back button on the last step.
In the meantime you can edit src/sass/components/stepper/_base.scss
// Base
.stepper {
&.last {
[data-kt-stepper-action="previous"][data-kt-stepper-state="hide-on-last-step"] {
display: none !important;
}
}
} And add
data-kt-stepper-state="hide-on-last-step" attribute to hide the back button on the last step:<button type="button" class="btn btn-lg btn-light-primary me-3" data-kt-stepper-action="previous" data-kt-stepper-state="hide-on-last-step">
Back
</button> Then recompile your assets folder with Gulp or Webpack.
Please note that the build tools are only required in the development environment to compile the assets when the source folder files are modified. In the hosting/server deployment, you will only need the compile assets, no need to install the build tools dependencies there.
Regards.