Form theming and custom CSS

Two levels of styling

A form's appearance is controlled two ways:

The theme

The builder has a Theme area where you set the form's colours, fonts, corner rounding, shadows and header style through a visual editor. The theme is saved as its own file on the form record, separate from the form definition. The theme always uses its latest saved state. Most branding needs, such as matching a primary colour and font, are met here without writing any CSS.

Creating and editing the theme with AI

You can also create or change the theme by asking the AI Assistant in the builder:

Make the theme light with our brand green as the primary colour, a larger base font and softly rounded corners.

The assistant reads the current theme, proposes the smallest set of changes that achieves the look you asked for, and lists them on the plan card with every other change in that request. After you approve, the theme is updated as an unsaved change and written when you press Save in the builder.

The assistant works on the theme only. It does not write custom CSS, and it never touches a Form Style record: that is still edited on the record's own Salesforce record page, as described below. See AI assisted form building.

Custom CSS through Form Style records

For styling beyond the theme, use a Form Style record. This is a separate record whose custom code field holds raw CSS. A form looks up to a Form Style record, and that record's CSS is applied when the form renders.

Setting it up

  1. Create or open a Form Style record.
  2. Put your CSS in its custom code field.
  3. On the form record, set the Form Style lookup to that Form Style record.

Because a Form Style record is separate and reusable, several forms can share one Form Style, so a single set of overrides can brand many forms consistently. The custom CSS is edited on the Form Style record itself, using the standard Salesforce record page, not inside the builder app.

When CSS is applied

Custom CSS is applied at render time, when the form loads, both on the live form and in the preview. It layers on top of the theme, so use it for targeted overrides rather than restyling everything from scratch.

Tips