Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
So I have a fresh install of 7.2.4 with the 4.1.1 Forms Package installed.
I have created a very basic test form which is working except it isn't displaying the "Thank you" message once the form has been successfully submitted. More specifically, that part of it isn't working when I add the form macro to a traditional C# masterpage. So this isn't working:
<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %> <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server"><!DOCTYPE html><html><head> <meta charset="utf-8" /> <title>FORM TEST</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script></head><body> <umbraco:Macro FormGuid="938358a1-9100-42e9-a339-6bbc7ce27269" Alias="FormsRenderForm" runat="server"></umbraco:Macro> </body></html> </asp:Content>
I've had a look at the Form.cshtml file and a brief test of it tells me that "Model.SubmitHandled" is always returning false, even though the form submissions are being saved and can be viewed in the backoffice.
Am I missing something or is this a bug?
Hi Gavin and welcome to our :-),
Have you do some modification in the UmbracoSettings.config under the /Config folder in your Umbraco installation. The reason why I am asking is because from Umbraco 7, it runs in MVC mode as default, and you are trying to use WebForms.
You can of course using WebForms Umbraco 7.2.4, you just need to change the defaultRenderingEngine to WebForms instead of Mvc, see this documentation https://our.umbraco.org/documentation/Reference/Templating/Mvc/
Hope this helps,
Hi Dennis and thanks for your reply.
I've updated the defaultRenderingEngine setting to WebForms and republished the entire site, however the problem remains.
Hi Gavin ,
Did you also recycle your application pool for the site, As I remember it's necessary to do this, before it takes effect.
I'm using WebMatrix/IIS Express on localhost so not sure if that's possible. I've touched the Web.config file to force a rebuild but can't think of anything else to try really.
I ended up just creating a separate MVC masterpage for my webpages that have forms on them. So now I have about 90% of my website using webforms masterpages and the other 10% using MVC masterpages. Not ideal but it will suffice.
As far as I could tell, the new forms package works fine with webforms except for that one simple (yet fairly important as far as I'm concerned) problem with the "Thank you" message. It would be nice if it were fixed.
I think you should report it on the issue tracker, then we are getting it on to our feature request / bug ticket system. You can report it here: http://issues.umbraco.org/issues/CON If you can describe the steps to reproduce it, then it would be great.
Here are some documentation on how to write a good feature request / bug report. https://our.umbraco.org/contribute/report-an-issue-or-request-a-feature
I am having this same issue. I am using WebForms rather than MVC.
I solved this with a hack. I am not very familiar with the MVC, so I don't know if this is the best way to do this hack or not, but it works for me.
In the forms.cshtml file, I simply checked to see if the post values contained 'formID'. If so, I displayed the confirmation message. I know that this isn't the best method, but until the Umbraco team can provide some kind of patch or update, I don't see any other way. Here is the code:
if (Request.Form["FormId"] != null )
‘Place code that creates the form here’
In an odd twist of fate, this same thing happened again to me as we upgraded Umbraco from 7.4.2 to 7.13.2, and Forms from 4 to 7. The form was still not showing the 'thank you' message. In searching for a solution, I found my own solution that I posted above three years ago, and it still worked! Though now, it may be worth noting that the file is form.cshtml (rather than 'forms') and the path is \views\partials\forms\themes\default.
Thanks @Ross! You are the man !!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted