update: so rather than trying to follow the docs and use "renderUmbracoForm", I copied what the shipped "InsertUmbracoFormWithTheme" view does internally and used this to render the Umbraco form:
so should the umbraco 9 docs say to use that i wonder? Is "renderUmbracoForm" only in umbraco 9 for legacy purposes? I'm using umbraco 9.2.0 and Umbraco.Forms 9.2.1.
Is the a clean way in umbraco 9 where you can simply show an umbraco form without using a macro? 🤞
Thanks for posting about this Andrew, I've just spent the last hour or so trying to make a blocklist view component that allows CMS users to pick an Umb Form to insert (in v9).
Quite why this isn't in the documentation I don't know, I get it when not everything is documented on Open Source stuff, but we're paying for a license to use this!
Umbraco Forms and using Umbraco.RenderMacroAsync in a partial
Hi - When I follow https://our.umbraco.com/Documentation/Add-ons/UmbracoForms/Developer/Rendering-Scripts/ and add the following to a page view (i.e. something that inherits UmbracoViewPage) then the form shows just fine:
But i'm using nested content and want to use this macro within the partial view representing my nested content. When i try the above code I get:
How can I use the same “UmbracoHelper” instance in a partial view that the page template uses?
I tried “@inject UmbracoHelper umbraco” so far which is what gives me the error above
Thanks
Andrew
update: so rather than trying to follow the docs and use "renderUmbracoForm", I copied what the shipped "InsertUmbracoFormWithTheme" view does internally and used this to render the Umbraco form:
so should the umbraco 9 docs say to use that i wonder? Is "renderUmbracoForm" only in umbraco 9 for legacy purposes? I'm using umbraco 9.2.0 and Umbraco.Forms 9.2.1.
Is the a clean way in umbraco 9 where you can simply show an umbraco form without using a macro? 🤞
Thanks for posting about this Andrew, I've just spent the last hour or so trying to make a blocklist view component that allows CMS users to pick an Umb Form to insert (in v9).
Quite why this isn't in the documentation I don't know, I get it when not everything is documented on Open Source stuff, but we're paying for a license to use this!
Thanks for posting this Andrew. Your solution works very well.
is working on a reply...