which works well. I just don't know which line to put into the template when using the form picker.
If you can suggest the actual line I need to add into the template for this option that would be great. Or do I need to set up a separate macro for rendering these?
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The server tag is not well formed.
Source Error:
Line 39: <umbraco:Item field="bodyText" runat="server" />
Line 40: <umbraco:Item field="formHeader" insertTextBefore="<h2>" insertTextAfter="</h2>" runat="server" />
Line 41: <umbraco:Macro FormGuid="[#formContent]" Alias="umbracoContour.RazorRenderForm"runat="server"></umbraco:Macro> Line 42: <umbraco:Macro runat="server" language="cshtml">
Line 43: @if (@Model.formHeader.ToString() != string.Empty)
Form not rendering on page when using Form Picker
Hi, I'm struggling to render a form using the form-picker (rather than the editor using the insert macro - insert form from razor option)
I've tried using this in the template but it doesn't work:
Comment author was deleted
You can't nest those tags, try using [#formContent] instead of the umbraco:item tags
and are you running the site in webforms mode? Since those tags will only work for that
If you are unsure could you let me know which umbraco version you are running and how the rest of your template looks?
Comment author was deleted
Or if you insert the macro using the UI how does the macro snippet look then?
Thanks Tim, I have to admit I'm out of my depth with this so am not exactly sure what needs to change from what you have suggested.
Usually the editors insert a form using the [insert macro] - [Insert form from Umbraco Contour]
If they do this then it works fine with the following in the template:
however, I wanted to make it easier for them by using the form picker.
On some other templates where we know exactly which form is needed each time we use the following:
which works well. I just don't know which line to put into the template when using the form picker.
If you can suggest the actual line I need to add into the template for this option that would be great. Or do I need to set up a separate macro for rendering these?
thanks again
Comment author was deleted
if the property on your page has the alias formContent then it's (using this syntax it will fetch the formcontent property from the current page)
Thank you Tim,
Yes, the property alias is formContent.
I tried that and got the following Parser Error:
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The server tag is not well formed.
Source Error:
Line 39: <umbraco:Item field="bodyText" runat="server" /> Line 40: <umbraco:Item field="formHeader" insertTextBefore="<h2>" insertTextAfter="</h2>" runat="server" /> Line 41: <umbraco:Macro FormGuid="[#formContent]" Alias="umbracoContour.RazorRenderForm"runat="server"></umbraco:Macro> Line 42: <umbraco:Macro runat="server" language="cshtml"> Line 43: @if (@Model.formHeader.ToString() != string.Empty)
Source File: /masterpages/RecruitmentEvent.master Line: 41
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Comment author was deleted
think you need a space before the runat="server"
Comment author was deleted
so
Thanks so much Tim, all working now!
Comment author was deleted
great :) more details on that syntax can be found here http://our.umbraco.org/wiki/reference/templates/umbracomacro-element/macro-parameters/advanced-macro-parameter-syntax
is working on a reply...