I have a Jquery Steps form that contains three steps. I want in the last step to disable the left and right keys so I can stay in the same step.
$(function() {
form_prop = $("#new_prop").show();
form_prop.steps({
headerTag: "h3",
bodyTag: "fieldset",
transitionEffect: "slideLeft",
onStepChanging: function(event, currentIndex, newIndex) {
if (currentIndex == 2) {
form_prop.on('keyDown', function(event) {
const key = event.key; // "ArrowRight", "ArrowLeft", "ArrowUp", or "ArrowDown"
if (key == "ArrowRight" || key == "ArrowLeft") {
// Disable Next and previous
}
});
}
}
});
});