Error 'Please provide a valid form Id' while the containing page is being rendered.
I have recently started using Contour and created a test form to check its features. Whenever I add this sample form to my node content receiving "Please provide a valid form Id" exception in MvcRenderContourForm.cshtml.
I checked the parameter for macro "umbracoContour.RazorRenderForm" and it sounds fine with following details:
alias: formguid ---- Name: Choose Form ---- Type: FormPicker
The exception is occuring in the last row of following code in MvcRenderContourForm.cshtml.
It is working correctly in RTE. Actually it passed correct FormGuid to the MvcRenderContourForm.chtml. But when I am trying to render the page, sounds the FormGuid is missing somehow!
Error 'Please provide a valid form Id' while the containing page is being rendered.
I have recently started using Contour and created a test form to check its features. Whenever I add this sample form to my node content receiving "Please provide a valid form Id" exception in MvcRenderContourForm.cshtml.
I checked the parameter for macro "umbracoContour.RazorRenderForm" and it sounds fine with following details:
alias: formguid ---- Name: Choose Form ---- Type: FormPicker
The exception is occuring in the last row of following code in MvcRenderContourForm.cshtml.
@inherits umbraco.MacroEngines.DynamicNodeContext
@using Umbraco.Forms.Mvc.Bridge.Html;
@{
string action = "ContourForm";
string controller = "FormRender";
string formtoken = "UmbracoContourForm";
string formGuid = Parameter.formguid;
@Html.RenderMvcAction(action, controller, formGuid, formtoken, (umbraco.MacroEngines.DynamicNode)Model, (System.Dynamic.DynamicObject)Parameter);
}
Any suggestions?
Did you try to add the form in the RTE by choosing a macro? Check out what happens if you do that.
Jeroen
It is working correctly in RTE. Actually it passed correct FormGuid to the MvcRenderContourForm.chtml. But when I am trying to render the page, sounds the FormGuid is missing somehow!
OK, I found the source of problem.
Our application using a customized MVCRender method to generate the html codes. The problem was located in this function with its Regex filtering...
is working on a reply...