I have started using Contour in Umbraco 4.5. I have tried 2 ways of adding contour to my page but to no avail. The following describes in more detail.
1. Added macro to rich text editor in page in CMS. After doing this I published the page, but when I go to view the page in the browser nothing shows. Viewing the HTML source, I notice this:
2. Created document type with "form picker" property. Inserted "umbraco:Item" onto corresponding template with alias set to same as property. This time, all that shows in the page/source is:
62efdd05-e05e-4d90-ad73-bfb03d1a16f5
..which is just the form id.
I am very confused about this, can you please help?
Sorry for hijacking your post Duncan, but I seem to have something similar and Tim may be able to help:
umbraco v 4.7.0.RC (Assembly version: 1.0.4077.25828)
Have created basic form with one text field. I can add the form to a template without a problem via the add marco button when editing a template. Form renders fine on front end.
If I add the same form via macro button on rich text editor when editing a document it will render fine in the editor, but won't render correctly on the front end when I save and publish.
I do get something on the front end though. Strangly this is actually rendered on the page:
I have a very tight deadline and honestly the whole project is forms so any help is greatly appreciated. I'm running contour in trial mode as I don't know the domain of the site yet, but I have purchased it.
I have just found what is breaking this for me anyway:
If you are inserting the form macro into the text editor, and the content of this text editor is inserted into the template via the "insert umbraco page field" button on the edit template screen, and when inserting you choose to check the "Convert Linebreaks" checkbox...It will break the form render. If you set "convertLineBreaks" to false, it will render the form properly.
Contour not rendering properly
I have started using Contour in Umbraco 4.5. I have tried 2 ways of adding contour to my page but to no avail. The following describes in more detail.
1. Added macro to rich text editor in page in CMS. After doing this I published the page, but when I go to view the page in the browser nothing shows. Viewing the HTML source, I notice this:
<?UMBRACO_MACRO formguid="62efdd05-e05e-4d90-ad73-bfb03d1a16f5" macroAlias="umbracoContour.RenderForm" />
2. Created document type with "form picker" property. Inserted "umbraco:Item" onto corresponding template with alias set to same as property. This time, all that shows in the page/source is:
..which is just the form id.
I am very confused about this, can you please help?
Duncan.
Comment author was deleted
Hi Duncan,
Can you try adding the macro on a template , does that work?
Thanks Tim, the solution was to add the macro:
<umbraco:Macro runat="server" Alias="umbracoContour.RenderForm" FormGuid="14510fe4-1e26-4694-b817-87cd88ebfc23" />
Glad it's working!
Duncan.
Sorry for hijacking your post Duncan, but I seem to have something similar and Tim may be able to help:
umbraco v 4.7.0.RC (Assembly version: 1.0.4077.25828)
Have created basic form with one text field. I can add the form to a template without a problem via the add marco button when editing a template. Form renders fine on front end.
If I add the same form via macro button on rich text editor when editing a document it will render fine in the editor, but won't render correctly on the front end when I save and publish.
I do get something on the front end though. Strangly this is actually rendered on the page:
formguid="0f488ca7-caa0-47c1-b8ae-13bb46e60887"
macroAlias="umbracoContour.RenderForm" />
and it appears like this in the source:
formguid="0f488ca7-caa0-47c1-b8ae-13bb46e60887"<br/>
macroAlias="umbracoContour.RenderForm" />
I have a very tight deadline and honestly the whole project is forms so any help is greatly appreciated. I'm running contour in trial mode as I don't know the domain of the site yet, but I have purchased it.
Thanks
Dean
I have just found what is breaking this for me anyway:
If you are inserting the form macro into the text editor, and the content of this text editor is inserted into the template via the "insert umbraco page field" button on the edit template screen, and when inserting you choose to check the "Convert Linebreaks" checkbox...It will break the form render. If you set "convertLineBreaks" to false, it will render the form properly.
Also, for reference, note that it is not possible to output Contour forms via XSLT, as Tim mentions here:
"It's not supported to run a usercontrol macro (wich the Contour macro is) from inside xslt."
I've just run into a related problem via that avenue. Outputting via <umbraco:item /> works fine, although it is less flexible.
is working on a reply...