BarbaJs - reset form after submit, or prevent persisted form state when ajax loads HTML form

We use BarbaJS (https://barba.js.org/) to handle page transitions on our site. Page requests are processed by Barba, which replaces the main content of the site when each Ajax request is resolved.

If a user interacts with a Gravity Form, either by submitting it successfully, or by producing a validation error, that same form state persists when a new page is loaded. So, if I have successfully posted a form and a confirmation message has been presented to me, I’ll see that same confirmation message when I click the “home” link, instead of the default state of the form.

I have tried loading the form via ajax, instead of rendering it in PHP. When I do this, the form state is always correct, but the form no longer submits.

Is there anything I can do to ensure I receive the default state of the form, each time a page request processes? Or, is there the means to reset the form, when the page loads?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.