Inline thank you message on Sitecore Forms

With the release of Sitecore Forms Extensions module, the ShowFormPage custom submit action was added.

This new custom submit action makes it possible to show a thank you message after submitting the form without the need of creating a dedicated seperate thank you page. With this action, the form is replaced inline via ajax, there is no other page loaded.

How

Let’s create a simple form to let users subscribe to a kind of newsletter.

The form contains a single email field and a submit button, with the submit action save data.

 

Now, let’s add a second page in the form (just like you would do for a multipage form).

Give the page a name.

Add some components on the thankyoupage.

On the submit button: add the submit action “show form page” and select the thank you page.

Result

Analytics

Now that we don’t show a dedicated result page, you might want to add some javascript to put an event on your analytics datalayer when the thank you page is shown.

In order to do so, a new field “RawHTML” is now provided by the Sitecore Forms Extensions module.

 

Leave a Reply