Issue with the "Previous" Button in Multi-Step Form

Hi,

We are experiencing an issue with the “Previous” button in our multi-step form. Specifically, when we go back to a previous step, the AJAX functionalities of the fields stop working.

Unfortunately, we are unable to resolve this issue through modifications to our code, as the functions involved are part of the Scriptcase framework.

Below is the list of functions that are executed when the “Previous” button is pressed:

  • scBtnFn_sys_format_stepret()
  • scJQWizardGoToPreviousStep()
  • scJQWizardValidateStep(stepGoTo)
  • do_ajax_form_Prova_submit_page_0(stepGoTo)
  • do_ajax_form_Prova_submit_page_cb_0(data)
  • scJQWizardGoToStep(stepNo)
  • displayChange_page(page, status)
  • displayChange_page_0(status)
  • displayChange_block(block, status)
  • displayChange_block_0(status)
  • displayChange_field(status)
  • displayChange_field_ani(row, status)

Could you provide us with guidance on how to solve this issue or suggest any possible alternative? We would greatly appreciate your help.

Thanks,

Maybe you can add a warning to inform the user of the implication in javascript

window.onbeforeunload = function () {
    return "Are you sure you want to leave this page?";
};

You can also try to prevent the user to go back by modifying the browser history, but I am not sure if it will work in a Multi-Step Form

javascript

history.pushState(null, null, location.href);
window.onpopstate = function () {
    history.pushState(null, null, location.href);
};