0

I am building some forms with Umbraco Forms, but before I do I need to ensure that it is going to be able to be extended in the way I need. Can anybody tell me how I can alter the MessageOnSubmit property to show a custom success message for each submission?

I have tried setting this (e.Form.MessageOnSubmit) in a custom workflow type, but the original message set in the UI is still always shown.

Appreciate any guidance you can offer.

Gary

GaryPretty
  • 171
  • 5

2 Answers2

2

It is possible to override the default UmbracoFormsController for form submission by inheriting from it yourself; and then overriding the OnFormHandled - from there you can set the MessageOnSubmit property on the model.

Then it's just a matter of updating the Razor template responsible for generating the form to point at your new controller instead of the default.

Robert Foster
  • 2,317
  • 18
  • 28
0

Another option would be to point the thank you at a page, that will pass the ID of the submission on the query string. You could then use that to generate any custom message that you need, in the view for the thank you page.

Tim
  • 4,217
  • 1
  • 15
  • 21