Flavonto Forms documentation, version 1.0.0

Building forms

Design and styling

Designs, colours, dark mode, label positions, spacing, and custom CSS with design tokens.

The form's Appearance settings change its whole look without code.

Setting Choices
Design Clear, Soft, Outline, Underline, Card, Compact, High contrast, Match my theme
Colours Light, Dark, or follow the visitor's system setting
Accent colour and text on the accent Buttons, focus rings, selected choices
Corner radius, spacing, field size Fine tuning
Labels Above the field, beside it on wide screens, or inside the field
Choice style Standard, buttons or cards
Button style and alignment Solid, outline or soft; start, centre, end or full width
Maximum width and position For example 640px, centred

Match my theme keeps your theme's fonts and colours and only adds layout, spacing and states. High contrast uses strong borders and colours for people with low vision. Every design keeps visible focus, errors that do not rely on colour alone, and 44 pixel touch targets on phones.

The canvas in the builder shows the real design, and the device buttons in the toolbar show it at tablet and phone widths.

Under the advanced Appearance settings you can also set the Label colour, the Required marker colour and the Placeholder colour. The builder's Check warns when a colour you chose is hard to read against the form's background (text needs 4.5 to 1).

The form adapts to its own width

Side labels and columns follow the width of the form itself, not the width of the screen. A form placed in a narrow sidebar stacks its labels and columns even on a wide monitor, and a form in a wide area keeps its columns. Each columns row can set the Space between columns (none, small, medium or large).

Motion and sending

Styles for one field

Styles for this field (a field's Advanced settings) takes CSS declarations for each part of that field: the whole field, the label, the input, the description and the error message. For example color: #1f2937; font-weight: 600; on the label. They apply to that field only, so you do not need to write selectors.

A starter theme

The plugin folder contains examples/starter-theme.css, a commented file with every design token and the most useful selectors. Copy it into your theme, or paste the parts you need into Custom CSS for every form, and change the values.

Custom CSS

Each form has Custom CSS for this form (Advanced group) and the site has Custom CSS for every form (Settings, Interface). Rules are added after the form's own styles.

The form's styles are written with low specificity, so short selectors win. The easiest way to restyle is to change the design tokens on the form wrapper:

.flvf {
	--flvf-f-accent: #6b21a8;
	--flvf-f-radius: 4px;
	--flvf-f-gap: 24px;
	--flvf-f-font-size: 17px;
}
Token What it changes
--flvf-f-accent, --flvf-f-accent-strong, --flvf-f-on-accent Accent, its hover shade, text on it
--flvf-f-text, --flvf-f-muted Text and help text colours
--flvf-f-label, --flvf-f-req, --flvf-f-placeholder Label, required marker and placeholder colours (the advanced colour settings fill these)
--flvf-f-bg Form background
--flvf-f-field-bg, --flvf-f-field-text, --flvf-f-field-border, --flvf-f-field-border-w Fields
--flvf-f-radius, --flvf-f-gap, --flvf-f-control-h, --flvf-f-font-size, --flvf-f-label-weight, --flvf-f-label-w Shape and spacing
--flvf-f-error, --flvf-f-ok, --flvf-f-focus Error, success and focus colours
--flvf-f-max Maximum width

Useful classes: .flvf (the form wrapper, with flvf-preset-* and flvf-scheme-* classes), .flvf-field (each field, with flvf-f-<type>), .flvf-label, .flvf-input, .flvf-help, .flvf-error, .flvf-has-error, .flvf-step, .flvf-progress, .flvf-submit, .flvf-confirmation. Every field also has the CSS classes you give it in its Advanced settings.

When you change colours, check the contrast: text needs at least 4.5 to 1 against its background, and field borders and focus rings at least 3 to 1.

Custom JavaScript

A form can carry Custom JavaScript for this form (Advanced appearance settings). It runs after the form, with the variable form set to the form's outer element. Two safeguards apply:

Prefer the documented events in JavaScript events for integrations; they keep working when the form's markup changes.