Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save weirdpattern/978da84415b4e0c6a87cd46656575898 to your computer and use it in GitHub Desktop.
Save weirdpattern/978da84415b4e0c6a87cd46656575898 to your computer and use it in GitHub Desktop.
2019.03.05.wffm-success-message-override
/// <summary>
/// Formats the success messages.
/// </summary>
public class FormatSuccessMessage
{
/// <inheritdoc />
public void Process(SubmitSuccessArgs args)
{
Assert.ArgumentNotNull(args, nameof(args));
if (args.Form == null) return;
args.Result = LinkManager.ExpandDynamicLinks(args.Form.SuccessMessage);
}
}
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<successAction>
<processor type="Sitecore.Form.Core.Pipelines.FormSubmit.FormatSuccessMessage, Sitecore.Forms.Core">
<patch:delete />
</processor>
<processor type="MyAssembly.Namespace.Pipelines.FormatSuccessMessage, MyAssembly.Namespace" />
</successAction>
</pipelines>
</sitecore>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment