![]() ![]() To replace the default Save Data action, go to /sitecore/System/Settings/Forms/Submit Actions, click Save Data and, in the Settings section, in the Model Type field, replace the current value with your custom Save Data action class name. Public override void ExecuteAction(FormSubmitContext formSubmitContext, string parameters)Īssert.ArgumentNotNull(formSubmitContext, nameof(formSubmitContext)) į(new FormActionError _errorMessage = exception.Message //Condition 4 Logger.LogError(exception.Message, exception, this) _errorMessage = "No data to save!" //Condition 3 If (sessionId = Guid.Empty)// Condition 2įoreach (var postedField in postedFields) Protected override bool SavePostedData(Guid formId, Guid sessionId, IList IViewModel postedFields) Public CustomSaveData(ISubmitActionData submitActionData) : base(submitActionData) For example: class CustomSaveData:SaveData Jan 28th 2018 15:04 Woodruff Bug has been. substitution only available in the Applications Region Error Message. Inside your custom Save Data submit action class, you must manage the value of the error messages based on the different conditions. This has impact both on logs on the right and on the action text on top. You can use substitution strings in Application Builder in the following ways. ![]() Here you can assign customized error messages that override the predefined submit error message. To change a form submit error message from a save action programmatically, create a custom Save Data action that overrides the ExecuteAction method of the SubmitActionBase class. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |