I have created a custom form actor that sends form data to an external service. If the form does not submit successfully to this service I create a SubmissionActorResult object and set it to cancel submit and add an error message to it. When this result object gets sent back to the form and displays the error on the form page it has an additional error messege prepended to the one I wrote to the result object. It always adds "Failed to submit." In front of the error message That I wrote.
I can't find where this message comes from. I would like to remove it or at the least localize it but I can't find how to do this.
You can override method BuildReturnResultForSubmitAction in DataSubmissionService as below and register dependency in initialization module. It should work.
public class CustomDatasubmissionService : DataSubmissionService
FormContainerBlock formContainer = null, Dictionary<string, object> additionalParams = null, SubmissionInfo submissionInfo = null,
Submission submission = null, bool isProgressiveSubmit = false, string redirectUrl = "")
var message = string.Join("<br/>", errorMessages);
foreach (var msg in errorMessages)
// the default behavior, that's why an additional message was added
// don't add an additional message
Great. This is just what I was looking for.
Thank you Quan.
Calvin, If someone answers your question, please click the Mark Answer button. Thank you.
Sorry, had planned on it and got sidetracked.