Last active
March 5, 2019 19:37
-
-
Save weirdpattern/978da84415b4e0c6a87cd46656575898 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2019.03.05.wffm-success-message-override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <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); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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