0

I want to know where to place the CSS file that i want to add for a Sitecore form field. For the WFFM the path was sitecore modules/Shell/Web Forms for Marketers/Themes. I am using Sitecore 9.1 and I have the form module working fine. But there are no Web Forms for Marketers folder. Where should we place the custom CSS or script file for Sitecore Forms fields?

Updating the question 06/10/2020

I have placed my css file in below mentioned path "sitecore modules\Web\ExperienceForms\css". Custom css file name is basicfield.css and the content of the class is as below:

.btn-testsuccesss {

color: #fff;

background-color: hsl(93, 41%, 65%);

border-color: hsl(93, 41%, 45%);

}

adding the css in form field as below(also tried with direct css file name didnt work):

adding the css

But it is not reflecting, what am i missing? why is it not working?

1
  • Have you try adding the files at the path website/sitecore modules/Web/ExperienceForms/css? You may need to create the folder css if not present. Then, just add the css file name in the field of the main form – Hishaam Namooya Oct 1 '20 at 12:38
2

To start using custom styles and scripts in your forms:

In the Content Editor, navigate to sitecore/Forms, click the form that you want to add a script or style to and, in the Scripts or Styles field, add the name of your custom script or style file.

enter image description here

Add your custom style or script file to one of the following folders:

Scripts : /sitecore modules/Web/ExperienceForms/scripts

Styles: /sitecore modules/Web/ExperienceForms/css

1

You can below link for Sitecore Form styling - https://doc.sitecore.com/developers/90/sitecore-experience-manager/en/add-styles-and-scripts-to-sitecore-forms.html

Sitecore Forms uses css and script files located in: <siteroot>/sitecore modules/Web/ExperienceForms

So for css you can go to path - <siteroot>/sitecore modules/Web/ExperienceForms/css

0

Have you tried this in the marketing forms?

css

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.