The steps which I did as below.
1. dotnet new epicmsempty --name Test
2. Nuget install Episerver.Forms
3. Created a basic HomePage with a contentArea. The page shown no problem.
4. Added a new form and then put it to the contentArea in the HomePage.
5. In One-page Editing, the format of the form looks okay. But after publishing and turnning to the host website, I found the form looks like without any css styling.
Then I checked my project, I found there is nothing under my wwwroot folder. But there is a modules folder in the project root directory with zip files in EpiServerForms folder.
Then I unzip the files and copied the whole modules folder with the css files to wwwroot. (I can see those css in d:\repos\Test\wwwroot\modules\_protected\EPiServer.Forms\EPiServer.Forms\5.2.0\ClientResources\ViewMode).
But it is still not working.
Can someone help with this please?
Thanks in advance.
I believe the issue and answer could be related to your other post:https://world.optimizely.com/forum/developer-forum/CMS/Thread-Container/2022/7/new-step-forms-get-http-error-405/
The required CSS files for forms are rendered by adding this line of code to the <header> section in your layout/root view.
Did you install EPiServer.Forms.UI nuget. If not can you try and then let us know.
Yes. I have tried to separately install EPiServer.Forms.UI nuget which does not resolve the issue.
So far, add @Html.RequiredClientResources("Header") and @Html.RequiredClientResources("Footer") is a correct solution.
But after adding these two lines, another problem appeared which is some of my customized bootstrap styling is not working anymore which used to be rendered fine.