Clear session after form has been submitted

I have built a series of forms (Parent > child > child > etc) as an e-commerce checkout. On the final step, payment is processed, and a number of Record Rules run that insert connected records. Occasionally, a user clicks the BACK button on their browser (I'm guessing this is what they do) and then RE-submits the form. Amongst other problems, it creates a duplicate payment record (and actually processes the card again).

Has anyone figured out a way to clear a form session (or something to this affect), after a form has been submitted, such that if a user clicks BACK on the browser, they won't be able to resubmit the form with the previously filled in session information?

I am also having the problem. Is there any solution for this?

Try adding this code to your Custom JavaScript.

// Change view_100 to your form
$(document).on('knack-form-submit.view_100', function (event, view, record) {
  // Prevent the back button from returning to this form after it's submitted.
  window.history.replaceState({}, null, ' ')
})

This might help.

Ian
Knack Pros