I can confirm this is still an issue in Umbraco Forms 4.0.1.
It seems like the form rendering and the script rendering should be made consistent, as currently I think the form is always rendered as the default 'Form.cshtml' view unless a path is passed to the RenderAction to tell it otherwise, whereas scripts seem to check if a guid-named folder exists - in which case they render that unless a custom path is passed in, in which case it requires the nested 'Forms' folder. It's all a bit confusing.
I'm not 100% certain on the above, but something's definitely awry :)
Umbraco Forms v4 - Custom rendering issue
We are having trouble getting Umbraco Forms to use our custom views.
In our view we have the following:
Which renders
/Views/Partials/Forms/HomeContact.cshtml
, great!We have also created
/Views/Partials/Forms/e6b9d634-d2d1-4281-b79d-477b81cd5752/Script.cshtml
But
FormViewResolver.GetScriptView(Model.FormId);
does not return this custom path, it is returning/Views/Partials/Forms/Script.cshtml
Have we missed something?
Thanks!
Comment author was deleted
Hmm looks like we have an additional forms directory so try
/Views/Partials/Forms/Forms/e6b9d634-d2d1-4281-b79d-477b81cd5752/Script.cshtml
We'll update so that extra folder isn't needed
Ah cool, yeah
/Views/Partials/Forms/Forms/GUID/
works!Thanks!
I can confirm this is still an issue in Umbraco Forms 4.0.1.
It seems like the form rendering and the script rendering should be made consistent, as currently I think the form is always rendered as the default 'Form.cshtml' view unless a path is passed to the RenderAction to tell it otherwise, whereas scripts seem to check if a guid-named folder exists - in which case they render that unless a custom path is passed in, in which case it requires the nested 'Forms' folder. It's all a bit confusing.
I'm not 100% certain on the above, but something's definitely awry :)
is working on a reply...