"Forms has not been initialized correctly"

Vote:
 

Working on a multi-site project. One of the sites has a form in which a empty box appears after submission. Like this:

This element should be hidden, but it's not. When inspecting the console i can see these error-logs: 

This works correctly on my other sites, and the css-class that hides this element comes from a file called: "EpiServerFroms.css" that has this class:

.EPiServerForms .Form__Status .hide {
    display: none
}

This css-file is not loaded on my new project

I have both the, so the necessary scripts should be there: 

@Html.RequiredClientResources("Header")
@Html.RequiredClientResources("Footer")
#331174
Edited, Oct 09, 2024 11:08
Vote:
 

According to this older thread, you might need to directly reference the latest version of some of the nuget packages that the umbrella package brings in. Most likely not the problem as the problem occur in only one of the sites in a multi-site scenario?

Also, there are some breaking changes from Forms 5.4 where configuration is moved from forms.config to appsettings.json:
https://docs.developers.optimizely.com/content-management-system/v1.2.0-forms/docs/configuring-optimizely-forms
...probably not that either.

#331180
Oct 09, 2024 15:07
Laurent - Oct 10, 2024 9:01
I believe everything is configured properly since it seems to work now. Read below on how I solved it without knowing why the first trial did not work.

Thanks for the response though, Tomas
Vote:
 

Ok, so I made it work, but am not sure why.

The form was being rendered in the context of my _baseLayout.cshtml as I wanted to dispaly it between the body and the footer. Once I moved it into a specific page (ArticlePage./index.cshmtl) then it worked again. Page-specific content are rendered using the @RenderBody-function. Maybe there are some scripts or "shared logic" that forms are depended upon?

#331229
Oct 10, 2024 8:53
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.