sitecoresitecore9

How to customize a error message in sitecore 9 forms submit action(Not WFFM forms)


While implementing a custom login form , i need to show why login failed on submit action, for eg message like no such user ,invalid credentials etcc..in sitecore 9 forms there is a field to provide general error message for all errors...but i want to provide custom messages..is it possible?


Solution

  • Are you asking if you can have different error messages depending on which input failed? I know there is a way to customize the error message for the submit action. Switch to the core database and navigate to /sitecore/client/Applications/FormsBuilder/Components/Layouts/Actions and select the submit action you want to add a custom message for. I believe the default message is "something went wrong". I haven't had the need to try to implement multiple unique error messages, but there are subitems under each submit action with templates for the form mapping fields. You could check those templates for a similar field.