at the beginning - great work with Hybrid Framework - kudos!
We are trying to adopt it to some of our projects and now I am dealing with integrating Contour / Umbraco Forms on website build on top of Hybrid Framework. The problem is, of course, that model passing from forms is a RenderModel, but most of the pages is requiring MasterModel<T> as a model. I just want to know what is your "best practise" to get this working? For example if we still want to let editors choose a thank you page etc. but also navigate back to current page with form submitted.
From my little "investigation", problem is when editor / admin don't choose redirect page for contour form placed somewhere on website. Then Contour is from default passing a RenderModel to this page and of course this is breaking model declaration (if we have strongly-typed declaration for page without RenderModel usage). It seems to fix / avoid problem when we choose, even the same, page to redirect to after form submit.
Second solution of course could be creating a custom workflow for Contour form or event posting form to some other page or the same page which could be handled by dedicated controller method. But this is much more "complicated" way.
So, as a summary: when user / editor / admin want to place a Contour / Umbraco Forms form on page which has view with strongly-typed declaration from Hybrid Framework or anyone else which is not inheriting from RenderModel, it's suggested to manually point a destination page or action for form submission.
Umbraco Forms (Contour) + Hybrid Framework
Hi all,
at the beginning - great work with Hybrid Framework - kudos!
We are trying to adopt it to some of our projects and now I am dealing with integrating Contour / Umbraco Forms on website build on top of Hybrid Framework. The problem is, of course, that model passing from forms is a RenderModel, but most of the pages is requiring MasterModel<T> as a model. I just want to know what is your "best practise" to get this working? For example if we still want to let editors choose a thank you page etc. but also navigate back to current page with form submitted.
Thanks in advance for clarifying that.
Hello,
If you let a page inherit from UmbracoTemplatePage it should also work:
So you pass your own custom model or don't change anything if you want. Some pages don't need the custom model.
If it's not clear maybe you can give me some more examples of what you're trying to do. I don't have a lot of experience with Umbraco Forms (Contour).
Jeroen
Thank you for your answer.
From my little "investigation", problem is when editor / admin don't choose redirect page for contour form placed somewhere on website. Then Contour is from default passing a RenderModel to this page and of course this is breaking model declaration (if we have strongly-typed declaration for page without RenderModel usage). It seems to fix / avoid problem when we choose, even the same, page to redirect to after form submit.
Second solution of course could be creating a custom workflow for Contour form or event posting form to some other page or the same page which could be handled by dedicated controller method. But this is much more "complicated" way.
So, as a summary: when user / editor / admin want to place a Contour / Umbraco Forms form on page which has view with strongly-typed declaration from Hybrid Framework or anyone else which is not inheriting from RenderModel, it's suggested to manually point a destination page or action for form submission.
is working on a reply...