We are unable to get the Success Message to display when a form is submitted. We have noticed that Model.SubmitHandled() in the Form.cshtml page is always equal to false. Therefore it never steps into the code that shows the success message.
@if (Model.SubmitHandled)
{
if (Model.RenderMode == "full" || Model.RenderMode == "form")
{
<p class="contourMessageOnSubmit">@Html.Raw(Model.MessageOnSubmit)</p>
}
}
else
{
// Display Form here
}
Oddly, this problem only occurs when the form is added as a macro via the RTE. If we manually add a form to a view, then it works as expected, i.e. SubmitHandled() is true and the success message does show when the form is submitted.
We have also checked the source code to compare a form added via the RTE against one added directly added into a view and it appears identical, except for the hidden input field with name='ufprt' which has a different value.
We are running....
Umbraco version: 7.2.8
Umbraco forms version: 4.1.4
Can anyone think of anything that we could try to rectify the issue?
I know this is an old post but someone might still have this issue.
What I realised was, on my Submit message / Go to page in my workflow, I was both setting a message on submit and a Go to page with the same page as the form. If you want the message to appear on the same page as the form, leave Go to page blank.
It seemed to make sense to me at the time to specify that I wanted to redirect back to the homepage. Probably a bit of a brain fart on my behalf...
Umbraco Forms - SubmitHandled() always false
Hi,
We are unable to get the Success Message to display when a form is submitted. We have noticed that Model.SubmitHandled() in the Form.cshtml page is always equal to false. Therefore it never steps into the code that shows the success message.
Oddly, this problem only occurs when the form is added as a macro via the RTE. If we manually add a form to a view, then it works as expected, i.e. SubmitHandled() is true and the success message does show when the form is submitted.
We have also checked the source code to compare a form added via the RTE against one added directly added into a view and it appears identical, except for the hidden input field with name='ufprt' which has a different value.
We are running....
Can anyone think of anything that we could try to rectify the issue?
Did you find a solution for this? And did you make an issue on http://issues.umbraco.org/?
Did anyone find a solution to this problem? We are experiencing the same, but using Umbraco Forms 4.3.2. Any ideas would be much appreciated. :)
I know this is an old post but someone might still have this issue.
What I realised was, on my Submit message / Go to page in my workflow, I was both setting a message on submit and a Go to page with the same page as the form. If you want the message to appear on the same page as the form, leave Go to page blank.
It seemed to make sense to me at the time to specify that I wanted to redirect back to the homepage. Probably a bit of a brain fart on my behalf...
We had the same problem, but the workflow was configured correctly - the problem was with the dependency injection we were using (Autofac).
We managed to resolve it by removing the .AsImplementedInterfaces() extension method when registering assemblies.
Broken
Working
is working on a reply...