Thank you page redirect
Explains how to configure the thank you page redirect.
Note
Optimizely Forms is only supported by MVC-based websites and HTML5-compliant browsers.
After a visitor submits a form, you can redirect them to a Thank you page using the Display page after submission field. You can have several forms go to the same Thank you page, so the following elements (in the redirect URL) let you know which form the visitor submitted using the DefaultAppendExtraInfoToRedirection
 class.
FormGuid
– Unique ID of theFormContainerBlock
. Use this ID to look up the form instance.FormLanguage
– Language of the container page (whereFormContainerBlock
 is dropped).FormSubmissionId
– Unique ID of the submission. Use this ID to look up the recent submission (which drives a visitor to the Thank you page).
Forms.Core
provides the IAppendExtraInfoToRedirection
interface, and lets you customize the Thank you page. You should:
- Implement the interface.
- Make an
InitializationModule
, and use Dependency Injection to replace the default implementation.
A third-party developer can alter this behavior by implementing IAppendExtraInfoToRedirection
, and using StructureMap in InitializationModule (DemoInitializationModule.cs) to replace the default implementation:
public void Initialize(InitializationEngine context) {
_serviceConfigurationContext.Container.Configure(c => {
c.For<IAppendExtraInfoToRedirection>().Use(new AppendInfoToRedirection());
});
}
See also the source code in Demo project on Episerver GitHub, especially the following code samples:
Updated 7 months ago