Overwriting the default 'thank you' form message using context.Record.MessageOnSubmit

Afternoon - has anyone had success overwriting the default ‘thank you’ form message using code?context.Record.MessageOnSubmit doesn’t appear to do anything.

Hi @perrito
I’m not exactly sure what or where you might be trying to do this but, have you checked the workflow?

Within the backoffice, if you go to the Forms section, click on your form and then down at the bottom of the screen there will be a workflow. If you click the Sumit message / go to page button, you can change the default thank you message

Thanks for your comment

It’s to show a different message depending on the form results (ideally without a redirect)

If you use context.Record.MessageOnSubmit in the C# workflow to set a new message it gets overwritten on save with the default ‘thank you’

Does this help? Return messageOnSubmit and redirect url when form is submitted with api · Issue #1104 · umbraco/Umbraco.Forms.Issues · GitHub Looks like someone was trying to do something similar in the past.

Or - rethinking the problem. Could you create a custom workflow (Adding A Workflow Type To Umbraco Forms | Umbraco Forms) where if the result of the form = X then you give them on message, if the result of the form = Y then you send them to a different message?

Just a thought.