> For the complete documentation index, see [llms.txt](https://kb.craftformswp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.craftformswp.com/documentation/form-building/form-styles.md).

# Form Styles

### Overview

Your forms can look like the rest of your site: the same accent colour, field borders, corners, fonts and buttons as your theme or CSS framework. **Settings → Form styles** connects them, once, for every form on the site.

On a new site you don't have to do anything: CraftForms sees which theme or framework you use and follows it. This is called **Automatic**. You can still change any part of it, or turn it off and set everything yourself.

Form styles work on top of the style each form uses (Default, Modern, Builderius CSS or Unstyled, picked in the Form block's **Styles** panel; see [Form Block](https://kb.craftformswp.com/documentation/form-building/create-form/blocks/form-block.md)). They don't replace that style: they give it your site's colours and sizes.

Form styles are free.

### Automatic: forms that match your theme

On a site set up with CraftForms 2.4 or later, forms follow the theme or framework the site runs, with nothing to set:

* **The order doesn't matter.** Install your theme first and CraftForms second, or the other way round: the result is the same.
* **Switching themes switches the forms.** Move from Bricks to Blocksy and your forms use Blocksy's colours and buttons on the next page load. Nothing is stored from the old theme, so nothing is left behind.
* **Your own changes stay.** Anything you change in Settings → Form styles is kept on top of what the theme gives (see [Change a value](#change-a-value)).

The same contact form on a Bricks site, before and after:

![A contact form on a Bricks site with CraftForms' own grey borders and a grey browser button](https://97821998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM2yV1foUgoGHBC66VBDw%2Fuploads%2FDO5BKffXj0jDSy1VZsIv%2Fform-styles--bricks-before.jpg?alt=media)

![The same form following Bricks: Bricks' border colour and its yellow primary button](https://97821998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM2yV1foUgoGHBC66VBDw%2Fuploads%2FUmA8mZFbIPQXYNZRrLHE%2Fform-styles--theme-bricks.jpg?alt=media)

And with other themes and frameworks, still with no settings:

![The form on Twenty Twenty-Five: the theme's black button, its Manrope font and spacing](https://97821998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM2yV1foUgoGHBC66VBDw%2Fuploads%2FqyAoyHnZowbIWsDzzyu1%2Fform-styles--theme-twentytwentyfive.jpg?alt=media)

![The form on Blocksy: Blocksy's field borders and its blue button](https://97821998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM2yV1foUgoGHBC66VBDw%2Fuploads%2F9xF8XJVb3dNRlgtvXB5m%2Fform-styles--theme-blocksy.jpg?alt=media)

![The form with Automatic.css 4: its primary colour on the button and its radius on the fields](https://97821998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM2yV1foUgoGHBC66VBDw%2Fuploads%2FQvaXnaLLTWPA8YFj1HoO%2Fform-styles--framework-automatic-css.jpg?alt=media)

#### Supported themes and frameworks

| Theme or framework                               | Followed when                                       | What forms take from it                                                                                                                                           |
| ------------------------------------------------ | --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Core Framework**                               | the Core Framework plugin is active                 | primary colour, text and title colours, surface, border, radius, spacing scale, text sizes                                                                        |
| **Automatic.css 4**                              | Automatic.css 4 is active                           | primary and hover colours, text colours, border, radius, spacing, text sizes, button padding and weight                                                           |
| **Automatic.css 3**                              | Automatic.css 3 is active                           | primary and hover colours, text colours, border, its form settings (label weight, field padding and spacing, field and button radius, button padding and weight)  |
| **Bricks**                                       | the Bricks theme is active                          | primary colour, text colours, border colour and radius, success and error colours, button                                                                         |
| **Blocksy**                                      | the Blocksy theme is active                         | palette colour 1, text and heading colours, form field border, focus colour, radius and width, button colours and padding                                         |
| **Kadence**                                      | the Kadence theme is active                         | palette, body font, button colours, spacing                                                                                                                       |
| **Divi**                                         | the Divi theme or the Divi Builder plugin is active | primary, body and heading colours (Divi 5 global colours)                                                                                                         |
| **Elementor**                                    | the Elementor plugin is active                      | global accent, text and secondary colours, text font, primary colour for the button, from your Elementor Kit, on every page (also pages not built with Elementor) |
| **Block themes** (Twenty Twenty-Five and others) | the theme is a block theme                          | the theme's own button (colours, hover, padding, corners), text and background colours, body font and spacing, from its theme.json                                |

Variables your framework adds itself (Bricks Style Manager, Core Framework or Automatic.css colours you made) aren't guessed: pick them in Settings → Form styles, where every field suggests them.

**When a site has more than one**, the most specific wins: a CSS framework (Core Framework, Automatic.css) first, then the theme or builder (Bricks, Blocksy, Kadence, Divi), then Elementor, then the block theme's theme.json. So a Bricks site with Automatic.css follows Automatic.css.

**Builderius CSS** isn't detected on its own: pick it in [Start from](#start-from-another-theme-or-framework), or use the form style of the same name.

#### Sites that had forms before

On a site that already had CraftForms forms, an update never changes how they look. Instead, CraftForms screens show an offer once:

![The notice: your forms can follow Bricks, with Match Bricks, See Form styles and No thanks](https://97821998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM2yV1foUgoGHBC66VBDw%2Fuploads%2FP6Ur7tg7hkSUyjDLXkB2%2Fform-styles--offer-notice.jpg?alt=media)

* **Match Bricks** turns Automatic on. Every form follows the theme from then on.
* **See Form styles** opens the settings, so you can look at the preview first.
* **No thanks** hides the notice. It comes back only if the site later runs a different theme or framework.

#### After a theme switch, with your own values

If Automatic is off and your values were made for one theme (for example, you filled them in from the Bricks preset), switching to another theme shows a notice on the Themes and Plugins screens:

![The notice: this site now runs Blocksy, but your form styles still use variables from Bricks, with Match Blocksy, See Form styles and Keep mine](https://97821998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM2yV1foUgoGHBC66VBDw%2Fuploads%2Fs1MIbGh4DeylywJ61FRb%2Fform-styles--theme-switch-notice.jpg?alt=media)

* **Match Blocksy** turns Automatic on for the new theme and drops the old values.
* **Keep mine** keeps your values. Where they point to the old theme's variables, which the new theme doesn't have, forms fall back to their own look: nothing disappears, and the submit button keeps a visible colour.

### Settings → Form styles

Go to **CraftForms → Settings → Form styles**.

![The top of Settings → Form styles: Follow Bricks automatically, switched on](https://97821998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM2yV1foUgoGHBC66VBDw%2Fuploads%2FapczIYO4AZcZPwljCgr2%2Fform-styles--settings-automatic.jpg?alt=media)

#### Follow automatically

The box at the top says which theme or framework CraftForms found, and whether forms follow it:

* **On**: forms take their values from the theme (the fields below show them in grey, marked **From Bricks**).
* **Off**: forms use only the values in the fields, whatever theme the site runs. When you switch it off, the theme's current values are copied into the fields, so nothing changes on the site until you edit them.
* If no supported theme or framework is active, the box says so, and forms keep their own style until one is.

Click **Save** after changing it.

#### Change a value

Every value has a field: colours, typography, spacing, shape and the submit button. Write a CSS value (`#0f766e`, `6px`, `1rem 1.5rem`) or one of your site's variables (`var(--primary)`). Each field suggests the variables your theme and framework define.

![The Submit button group with an own value for Corners, Back to Bricks under it, and the live preview](https://97821998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM2yV1foUgoGHBC66VBDw%2Fuploads%2FgSLCwKYEMO4N0JUaLp0N%2Fform-styles--settings-fields-preview.jpg?alt=media)

* With Automatic on, a field you fill in is **your own value**: it wins over the theme's, and only for that field. Everything else keeps following the theme, also after a theme switch.
* **Back to Bricks** under a field removes your value, so that field follows the theme again. **Reset all to Bricks** does it for every field.
* Under each field, CraftForms shows what the value comes to on your site (`= rgb(255, 214, 79)`), or **Not found on your site** when a variable doesn't exist there. Then the form style's own value is used.
* The **preview** on the right is one of your forms on your own site, with your theme's styles. It changes as you type. Pick another form at the top, or switch to **Phone** width.
* The count next to each group (**9 set**) includes the values that come from the theme.

#### Start from another theme or framework

**Start from** fills every field from a preset: any of the themes and frameworks in the table above, also ones that aren't active, plus Builderius CSS. Use it when CraftForms can't detect your setup, or to start from a framework you're moving to. Filling in turns Automatic off, because the values are now yours. Check the preview, then **Save**.

#### Clear

With Automatic off, **Clear all** removes every value: forms go back to their own style.

#### Classes

*New in 2.4.* Besides the variables, you can add your framework's own **classes** to the parts of every form, so a submit button is a real `btn--primary` or `bricks-button`, and a field gets your `form-input`. Open **Classes** at the bottom of Settings → Form styles:

| Row                                                                                                                   | Gets the classes                                                                  |
| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| **Submit button**                                                                                                     | The submit button                                                                 |
| **Back and Next buttons**                                                                                             | The step buttons in forms with steps (they don't get the submit button's classes) |
| **Fields**                                                                                                            | Text fields, text areas, dropdowns, date and colour fields                        |
| **Labels**, **Field wrapper**, **Options**, **Help popover**, **Form error message**, **Step progress**, **The form** | What each says                                                                    |

Separate several classes with spaces. **Use Bricks button classes**, **Use Automatic.css button classes** and **Use Core Framework button classes** fill in the two button rows with that framework's own names. The classes are added when the form is shown, on your pages, in embeds and in the preview here, which shows them once you save. Automatic never adds classes: you choose them.

### In Bricks, Elementor and Divi

The CraftForms element in Bricks, the widget in Elementor and the module in Divi have the same settings on their **Style** (Design) tab, for that one form, with the builder's own pickers (global colours, Style Manager variables). They win over Settings → Form styles. The element can also switch the form's style.

![The CraftForms element in the Bricks builder: Style tab, Colours group with a green accent, the form in the canvas with green rounded button](https://97821998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM2yV1foUgoGHBC66VBDw%2Fuploads%2FClAZHZbYiyjHojSsR08h%2Fform-styles--builder-bricks.jpg?alt=media)

![The CraftForms Form widget in Elementor: Style tab, Colours section with an orange accent, the form in the canvas with an orange button](https://97821998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM2yV1foUgoGHBC66VBDw%2Fuploads%2FZaigJzohBXb1LUWKzzIN%2Fform-styles--builder-elementor.jpg?alt=media)

![The CraftForms Form module in Divi's Visual Builder: Design tab, Colours with a teal accent and field border, the form in the canvas](https://97821998-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM2yV1foUgoGHBC66VBDw%2Fuploads%2FxINSmsD1722lIUM02cUp%2Fform-styles--builder-divi.jpg?alt=media)

### What wins

From weakest to strongest:

1. The form style's own value (Default, Modern, Builderius CSS, Unstyled).
2. What the theme gives (Automatic).
3. Your values in Settings → Form styles.
4. Settings for one form: the CraftForms element's Style tab in Bricks, Elementor or Divi, and the Form block's own colours and spacing in the editor.
5. Your own CSS.

States stay CraftForms' own: how focus, invalid and valid fields, error messages, custom controls and step progress look. Form styles only give them colours and sizes.

### Developers, static sites and other websites

Every value here is a CSS variable (`--cf-form-accent`, `--cf-form-radius` and so on), which you can also set in your own CSS, on another website where the form is embedded, or in code. See [CSS Variables and Classes](https://kb.craftformswp.com/documentation/form-building/form-styles/css-variables-and-classes.md).

### Questions

**My theme isn't in the list.** Turn Automatic off (or leave it, if nothing is detected), then fill in the fields with your theme's variables: the suggestions list every variable your site defines. A theme or framework can also add its own preset in code: see [CSS Variables and Classes](https://kb.craftformswp.com/documentation/form-building/form-styles/css-variables-and-classes.md#your-own-preset).

**I changed theme and the forms look plain.** With Automatic on, forms follow the new theme by themselves; if the new theme isn't supported, they use their own style. With Automatic off, look for the notice on the Themes screen, or switch Automatic on in Settings → Form styles.

**A field says "Not found on your site".** The variable it names isn't defined on your site's pages: check its spelling, or whether the framework that defines it is active. Forms use the form style's own value meanwhile.

**I set a colour, but my form doesn't change.** Something stronger is setting it: the CraftForms element's settings in your page builder, the Form block's own colours, or your own CSS (see [What wins](#what-wins)). Also clear your page cache.

**Do embedded forms get these values?** Yes, they travel with the embed. Values that point to your theme's variables need the same variables on the other website; otherwise the form's own look shows. See [CSS Variables and Classes](https://kb.craftformswp.com/documentation/form-building/form-styles/css-variables-and-classes.md#static-sites-and-other-websites).
