I was having some issues with Umbraco Forms in so much as, although it was installed, when I went to the form screen it would ask me to install it. So I uninstalled it and was then unable to install it except to download it and do it as a local package.
Now, when I view a page with a form on it, I get the wonderful:
jQuery has not been loaded & is required for Umbraco Forms.
See Umbraco Forms Documentation
I've followed the instructions about rendering scripts where I want (at the bottom, like normal people) but it still shows the error.
Strangely, I didn't have a 'Render Umbraco Form Scripts' macro so had to create that manually. I've changed the
Just tried to install Umbraco forms and I have the same issue as you.
I hadn't a 'Render Umbraco Form Scripts' macro so had to create that manually and it's not working event after creating it manually and adding to the template.
This. A big problem with Umbraco documentation is the partial solutions. Below the solution is indeed correct, but only half so after the 'Render Umbraco Form Scripts' macro has to be manually created.
Why is this documentation still outdated on the official umbraco documentation?
Go to -> Developers -> Partial View Macro Files -> InsertUmbracoFormWithTheme.cshtml -> at the end of this page you'll see something along the lines of:
Html.RenderAction("RenderForm", "UmbracoForms", new {formId = form, recordId = recordGuid, theme = theme, includeScripts = includeScripts });
change it to:
Html.RenderAction("Render", "UmbracoForms", new {formId = form, mode = "form", recordId = recordGuid, theme = theme, includeScripts = includeScripts });
I was having a similar issue with the red "jQuery Validate has not been loaded & is required for Umbraco Forms" message appearing after a recent auto-update to Forms 7.0.6 (via Umbraco Cloud).
When I made Mark's recommended change, the JavaScript issue went away, but it seems that the "Render" action doesn't pass through to the theme's "Form.cshtml" file, it uses the one at "\Views\Partials\Forms\Form.cshtml"
While stepping through code, I noticed that when the generic "Form.cshtml" file is hit, the model (Umbraco.Forms.Mvc.Models.FormViewModel) has a "Theme" property of null - even though the "Theme" WAS present in "InsertUmbracoFormWithTheme.cshtml" while stepping through.
It seems like this is a bug inside the UmbracoForms "Render" controller.
Okay, I contacted Umbraco Cloud support and was advised to make sure the option "Exclude Scripts" is CHECKED when inserting the macro onto a page. When I changed the macro back to using:
AND made sure the macro parameters were set to Exclude Scripts on each page using the forms, it worked - the JQuery message went away AND my theme was in use.
:-)
Umbraco Forms 6.0.1 jQuery Placement
Hi,
I was having some issues with Umbraco Forms in so much as, although it was installed, when I went to the form screen it would ask me to install it. So I uninstalled it and was then unable to install it except to download it and do it as a local package.
Now, when I view a page with a form on it, I get the wonderful:
I've followed the instructions about rendering scripts where I want (at the bottom, like normal people) but it still shows the error.
Strangely, I didn't have a 'Render Umbraco Form Scripts' macro so had to create that manually. I've changed the
to
but still get the error
Hi Mark
Just tried to install Umbraco forms and I have the same issue as you.
I hadn't a 'Render Umbraco Form Scripts' macro so had to create that manually and it's not working event after creating it manually and adding to the template.
Thanks,
Alex
This. A big problem with Umbraco documentation is the partial solutions. Below the solution is indeed correct, but only half so after the 'Render Umbraco Form Scripts' macro has to be manually created.
Why is this documentation still outdated on the official umbraco documentation?
But it started to work only when I added manually jquery to the template before Forms scripts:
Hi Alex,
Here's how I got it to work:
Go to -> Developers -> Partial View Macro Files -> InsertUmbracoFormWithTheme.cshtml -> at the end of this page you'll see something along the lines of:
Hi Mark
It works, great example, thank you.
Have a great day!
Alex
Hi Alex & Mark,
Did you manage to get this work with a custom theme?
Added the above fixes the jquery error, but it make the forms use the base theme.
Any idea how to use it with a theme?
Thanks
The documentation for Umbraco forms is terrible. I'll second the comment from Martin, how do we render the footer scripts to get the theme?
I have this:
But it still picks up the default theme rather than the theme I set.
Try to add the mode = "form" to the end of the RenderAction:
I have noticed the same issue -
I was having a similar issue with the red "jQuery Validate has not been loaded & is required for Umbraco Forms" message appearing after a recent auto-update to Forms 7.0.6 (via Umbraco Cloud).
When I made Mark's recommended change, the JavaScript issue went away, but it seems that the "Render" action doesn't pass through to the theme's "Form.cshtml" file, it uses the one at "\Views\Partials\Forms\Form.cshtml"
While stepping through code, I noticed that when the generic "Form.cshtml" file is hit, the model (Umbraco.Forms.Mvc.Models.FormViewModel) has a "Theme" property of null - even though the "Theme" WAS present in "InsertUmbracoFormWithTheme.cshtml" while stepping through.
It seems like this is a bug inside the UmbracoForms "Render" controller.
Okay, I contacted Umbraco Cloud support and was advised to make sure the option "Exclude Scripts" is CHECKED when inserting the macro onto a page. When I changed the macro back to using:
AND made sure the macro parameters were set to Exclude Scripts on each page using the forms, it worked - the JQuery message went away AND my theme was in use. :-)
is working on a reply...