jQuery-Smart-Wizard icon indicating copy to clipboard operation
jQuery-Smart-Wizard copied to clipboard

Cannot disable Finish button for steps other than final step

Open StateBarofArizona opened this issue 11 years ago • 3 comments

If a user steps through all steps, the Finish button appears. If they go back to another step and make changes prior to Finish I want them to go back to my final step, a confirmation screen, before they can Finish. I've tried various options to disable the Finish button on all but the final step but nothing so far works.

StateBarofArizona avatar Jan 16 '15 20:01 StateBarofArizona

Hey I am facing same problem. Did you find any solution over this

sandipwane avatar Jun 23 '16 11:06 sandipwane

Hi, i solved the problem as follows:

jquery.smartWizard.js line 387

Change:

if (this.options.includeFinishButton){ if (!this.steps.hasClass('disabled') || this.options.enableFinishButton){ $(this.buttons.finish).removeClass("buttonDisabled"); if (this.options.hideButtonsOnDisabled) { $(this.buttons.finish).show(); } }else{ $(this.buttons.finish).addClass("buttonDisabled"); if (this.options.hideButtonsOnDisabled) { $(this.buttons.finish).hide(); } } }

For:

if (this.options.includeFinishButton){ if(!this.options.enableFinishButton && (this.steps.length-1) !== this.curStepIdx) { $(this.buttons.finish).addClass("buttonDisabled"); if (this.options.hideButtonsOnDisabled) { $(this.buttons.finish).hide(); } } else { if (!this.steps.hasClass('disabled') || this.options.enableFinishButton){ $(this.buttons.finish).removeClass("buttonDisabled"); if (this.options.hideButtonsOnDisabled) { $(this.buttons.finish).show(); } }else{ $(this.buttons.finish).addClass("buttonDisabled"); if (this.options.hideButtonsOnDisabled) { $(this.buttons.finish).hide(); } } } }

Regards!

danonunez avatar Sep 12 '16 16:09 danonunez

thank you @danoespinoza

rahadi23 avatar Jul 06 '17 18:07 rahadi23