Create a custom CSS style in a web form

Last updated Wednesday, April 12, 2017 in Web Forms for Marketers for Developer

The Web Forms for Marketers module contains CSS styles that you can apply to form fields. Every field type has a default CSS style that is applied to it. You can also create custom CSS styles.

To create a custom CSS style:

  1. In the Website\sitecore modules\Shell\Web Forms for Marketers\Themes\ folder, in the custom.css file, define a new CSS style.

    Picture 3

  2. In the Content Editor, navigate to the sitecore/System/Modules/Web Forms for Marketers/Settings/Meta data/CSS Classes folder, and in the right pane click Extended List Item.

    Picture 1

  3. In the Message dialog box, enter the name of the CSS style, for example Short Date, and then click OK.
  4. In the right pane, in the Value field, enter the name of the CSS style. Click Save.

    You can now apply your custom CSS style to any form field in the Form Designer.

    Picture 5