I am trying to implement a custom Sitecore 9 Forms (not WFFM forms) functionality. And I need to show a success alert message on successful submission of the form.
But here's the catch,
- The success message should be available on the same page instead of going to next page as shown in (How to show success message in Sitecore 9 Forms?).
- The submit button's "Navigation Step" should be "Submit", so that after we submit the form, the form should remain blank, with the success alert message on display at the top of the form.
The closest solution I could find was: https://citizensitecore.com/2017/12/13/sitecore-9-forms-and-ajax-with-sxa/.
But then, it uses form submit action callback in jquery, which gets triggered on submit and not success. Thus with forms having validation errors, the submit will still trigger.
So what are the possible solutions?