We're using Sitecore Forms and allowing the user to add existing forms via a placeholder inside of a component. We have added the form in the placeholder and it renders as expected. Now we want to hook up the front end client side validation / styles.
The Sitecore docs say to add the following in the layout:
If you want to add a form to a page on an existing site, you must add references to the form stylesheets and JavaScript files. Add the reference
@using Sitecore.ExperienceForms.Mvc.Html
and in the head section add@Html.RenderFormStyles()
and@Html.RenderFormScripts()
However, after viewing the page source, it's clear that no script and style references are actually being added. No errors are being thrown in the log.
I can confirm that the script files are located in /sitecore-modules/Web/ExperienceForms/scripts
.
Looking at the item in the Sitecore tree, the form item itself has these fields:
It seems to me that @Html.RenderFormScripts()
and @Html.RenderFormStyles()
would reference these field values on page load, but somewhere along the line it's not.
Any ideas?