I have created a custom workflow and I would like to create a custom submit message rather than the general Submit Message / Go to Page built in workflow. I would like to create specific submit messages depending on certain question outcomes in my umbraco form/workflow. Is there any way to achieve this?
You probably have to do something custom to achieve a conditional submit message. Perhaps one way to go about it is to have the submit take the user to a custom page with the logic you want processed there? You should be able to nab the form data and do any conditional logic yourself on the page.
If using go to page…
Assuming your conditions are related to form values…
Extending | Forms | Umbraco Documentation
From an older version.. but as inspiration for the full implentation..
Getting Submitted Form Data in Umbraco Forms
If you want to use the submit message…
You could also manipulate via default theme overrides..
Themes | Forms | Umbraco Documentation
Sumbitted.cshtml
@model Umbraco.Forms.Web.Models.FormViewModel
@if (Model.MessageOnSubmitIsHtml)
{
<div class="umbraco-forms-submitmessage-html">
@Model.GetMessageOnSubmit()
</div>
}
else
{
<div>
<span class="umbraco-forms-submitmessage">
@Model.GetMessageOnSubmit()
</span>
</div>
}
@await Html.PartialAsync("Forms/Themes/default/ScrollToFormScript")
More involved.. you’ll see in the default theme RenderForm.cshtml
@using (Html.BeginUmbracoForm<Umbraco.Forms.Web.Controllers.UmbracoFormsController>("HandleForm", null, Model.HtmlAttributes, method: FormMethod.Post, antiforgery: Model.RenderAntiForgeryToken))
{
...
}
you could add and use your own “HandleForm” Method but not sure if you can inherit/override the native UmbracoFormsController…