In the below thread, the solution for adding @Html.RenderFormStyles()
and @Html.RenderFormScripts()
in OuterLayout.cshtml
was provided.
If we have an already existing site and we want to add forms to an existing web page is it required to create an
OuterLayout.cshtml
for the existing one?If yes, what is the solution for an existing site?
I tried adding @Html.RenderFormStyles()
and @Html.RenderFormScripts()
to the existing .cshtml
file without adding an OuterLayout.cshtml
as mentioned ABOVE but it did not work. I've added @Html.RenderFormStyles()
and @Html.RenderFormScripts()
in the head section as below to an existing ERE.Default-SubPage.cshtml
but when I ran the page, the scripts did not show up.
<head>
@Html.RenderFormStyles()
@Html.RenderFormScripts()
@if (!Sitecore.Context.PageMode.IsExperienceEditor)
{
@Html.Sitecore().Placeholder("head")
}
</head>
@Html.RenderFormScripts() and @Html.RenderFormStyles() do nothing