I'm developing a site in Umbraco 7. Added "Umbraco Forms" for a basic comment functionality.
However once posted the form disappears and shows the "thank you" message. I want the form to still be there so they can post another if they want to without refreshing the page.
So we get rid of the else bit, add in an extra @ or two because - well we all know razor is a bit of a dick
And error....
2015-09-09 16:51:37,265 [6] WARN umbraco.macro - [P2904/T1/D2] Error loading Partial View (file: ~/Views/MacroPartials/RenderUmbracoFormScripts.cshtml). Exception: System.Web.HttpException (0x80004005): Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at ASP._Page_Views_Partials_Forms_Form_cshtml.Execute() in d:\websiteName\v7\Views\Partials\Forms\Form.cshtml:line 142
Line 142 is
foreach (var script in Model.CurrentPage.JavascriptFiles)
Show the form after posting - Umbraco Forms
I'm developing a site in Umbraco 7. Added "Umbraco Forms" for a basic comment functionality.
However once posted the form disappears and shows the "thank you" message. I want the form to still be there so they can post another if they want to without refreshing the page.
Looking at /Views/Partials/Forms/Form.cshtml
It starts with
So we get rid of the else bit, add in an extra @ or two because - well we all know razor is a bit of a dick
And error....
Line 142 is
Of section
Any ideas?
So instead of trying to show the form after submit I just redirected on post back to the same page :)
Oh and I only wanted to target the one specific form so I did this:
is working on a reply...