Hello everyone, i would apreciate if someone can help me with this error message i get when i'm editing a page with a form i have buid.
I'm new at starting development umbraco pages and after search and read in tutorials and forum i still have my difficulties.
The message are:
EDIT: This also happens when inserting it as a Macro in the grid..
Here's the insertFormWithTheme.cshtml:
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@if (Model.MacroParameters["FormGuid"] != null)
{
var s = Model.MacroParameters["FormGuid"].ToString();
var theme = "";
var includeScripts = true;
@*
If a theme is provided as a macro parameter, forms will attempt to use custom theme files
ex: given the value "test", forms will look up views for the form and fields in a custom directory:
Form will be rendered with
/Views/Partials/Forms/Themes/test/form.cshml
Fields will be rendered with
/Views/Partials/Forms/Themes/test/FieldType/[fieldtypename].cshtml
If a file is not available in the custom directory, forms will fallback to the default files in
/Views/Partials/Forms/Themes/default/
*@
if(Model.MacroParameters.ContainsKey("FormTheme"))
{
theme = Model.MacroParameters["FormTheme"].ToString();
}
if (Model.MacroParameters.ContainsKey("ExcludeScripts"))
{
@*
Inverse the boolean - RenderAction Parameter expects it to be false for exclusion
But with default value for Macro Paramater boolean/checkbox being false
We want to ensure by default we include the scripts next to the form
*@
includeScripts = Model.MacroParameters["ExcludeScripts"].ToString() == "0";
}
var form = new Guid(s);
var recordGuid = Guid.Empty;
if (string.IsNullOrEmpty(Request.QueryString["recordId"]) == false)
{
Guid.TryParse(Request.QueryString["recordId"], out recordGuid);
}
Html.RenderAction("RenderForm", "UmbracoForms", new {formId = form, recordId = recordGuid, theme = theme, includeScripts = includeScripts });
}
Error loading Partial View script (file:~/views/MacroPartials/InsertUmbracoFormWithTheme.cshtml)
Hello everyone, i would apreciate if someone can help me with this error message i get when i'm editing a page with a form i have buid. I'm new at starting development umbraco pages and after search and read in tutorials and forum i still have my difficulties. The message are:
Error loading Partial View script (file:~/views/MacroPartials/InsertUmbracoFormWithTheme.cshtml)
When i preview or Save/publish the page with the form i can see it a live.
Thank you
Hi,
Are you inserting it as a macro into a richtexteditor? If so there is a bug regarding this. This will probably be fixed in the next version of Forms.
-Joep
Hi Joep
Yes i insert as macro into richtextedior. Thank you for the answer and help.
luis
I'm having a similar issue with a site that has been ported from v7 to v8.
We're using a Leblender control (shouldn't matter) to render in the grid with a form picker on it.
But however, the "InsertUmbracoFormWithTheme" that calls RenderAction throws an error;
The type or namespace name 'FormViewModel' could not be found (are you missing a using directive or an assembly reference?)
We're using the latest forms 8.6
EDIT: This also happens when inserting it as a Macro in the grid.. Here's the insertFormWithTheme.cshtml:
What am I missing?
Nevermind, I just needed to update the old theme and direct the forms.cshtml file to the proper model, e.g;
Hello,
I am facing the same issue with Umbraco v12.2, any suggestions on how to resolve this ?
Error loading Partial View script (file:~/views/MacroPartials/InsertUmbracoFormWithTheme.cshtml)
Thanks,
Did you find a solution for this? If so, Can you please share.
is working on a reply...