The SureForms
CSS Cheat Sheet.
Look up any SureForms variable or selector, copy a tested recipe, or build an AI prompt that writes the CSS for your form.
Every SureForms CSS variable and selector, checked against SureForms 2.12.9 and SureForms Business.
How it works
SureForms styles forms with CSS variables that start with --srfm-. For each form it prints a small style block that sets them on .srfm-form-container-{id}, and its stylesheet reads them. Change a variable and everything that uses it follows.
Find your form ID
Right-click the form, choose Inspect, and find the outer div whose class starts with srfm-form-container-. The number is the form’s ID.
<div class="srfm-form-container srfm-form-container-456 …">
Where to put your CSS
Appearance → Additional CSS, or a child theme
Start with both container classes: .srfm-form-container.srfm-form-container-456. For every form, repeat the class: .srfm-form-container.srfm-form-container.
Form editor → Custom CSS
Already limited to that form. Leave out the ID and container class, set variables on .srfm-form, and don’t use > or &.
Why two classes? SureForms prints its values inside the page, after your stylesheet. With just .srfm-form-container-456 both rules are equally strong and SureForms’ comes last, so it wins. The second class makes yours stronger. The same goes for element rules: SureForms’ selectors are usually four to six classes long, so copy its path and start it with both container classes rather than reaching for !important.
Input tints (borders, backgrounds, placeholders) are worked out from the colors in the Style tab when the page is built. Changing --srfm-color-scheme-text in CSS doesn’t recalculate them, so set the specific variables too, or change the colors in the Style tab.
With SureForms Business, per-side borders, shadows and the extra button controls only apply when the form has .srfm-custom-stylings. SureForms adds it when the form’s theme is Custom, Baseline, Minimal, Dark or a saved preset, not on Default.
Variables
Brand colors
The three colors from the Style tab. SureForms works out the input tints from the Style tab values when the page is built, so overriding these in CSS doesn’t change the tints.
-
--srfm-color-scheme-primaryMain brand color: submit button, focus rings, checked boxes, selected options.
Default: #046bd2
-
--srfm-color-scheme-text-on-primaryText color on the submit button.
Default: Style tab
-
--srfm-color-scheme-textBody text color. In the Style tab it also sets the input tints (borders, backgrounds, placeholders).
Default: Style tab
-
--srfm-btn-color-hoverSubmit button background on hover.
Default: primary at 90%
-
--srfm-body-input-colorText color of the success message. Not set by SureForms; set it to change that text.
Default: not set
Input colors
-
--srfm-color-input-backgroundInput background.
Default: text at 2%
-
--srfm-color-input-background-hoverInput background on hover.
Default: text at 5%
-
--srfm-color-input-background-disabledDisabled input background.
Default: text at 7%
-
--srfm-color-input-borderInput border. Also used by dropdowns and multi-choice cards.
Default: text at 25%
-
--srfm-color-input-border-hoverBorder on hover and focus, and on checked multi-choice cards.
Default: primary at 65%
-
--srfm-color-input-border-focus-glowFocus ring (box-shadow) color.
Default: primary at 15%
-
--srfm-color-input-border-disabledBorder of disabled inputs.
Default: text at 15%
-
--srfm-color-input-labelLabel text.
Default: text
-
--srfm-color-input-descriptionHelp text under a field.
Default: text at 65%
-
--srfm-color-input-placeholderPlaceholder text.
Default: text at 50%
-
--srfm-color-input-textText the visitor types.
Default: text
-
--srfm-color-input-prefixPrefix and suffix text and icons.
Default: text at 65%
-
--srfm-color-input-selectedBackground of checked multi-choice cards.
Default: primary at 10%
-
--srfm-color-multi-choice-svgColor of the unchecked multi-choice icon.
Default: text at 70%
-
--srfm-disabled-colorText of disabled inputs. Not set by SureForms.
Default: not set
-
--srfm-disabled-background-colorBackground of disabled inputs. Not set by SureForms.
Default: not set
-
--srfm-disabled-border-colorBorder of disabled inputs. Not set by SureForms.
Default: not set
-
--srfm-error-colorError message text.
Default: #dc2626
-
--srfm-error-color-borderInput border when a field has an error.
Default: rgba(220, 38, 38, .65)
-
--srfm-error-color-border-glowFocus ring when a field has an error.
Default: rgba(220, 38, 38, .15)
Dropdown colors
Dropdowns are built with Tom Select. These style its control, menu and multi-select badges.
-
--srfm-dropdown-input-background-hoverDropdown background on hover.
Default: text at 5%
-
--srfm-dropdown-placeholder-colorPlaceholder in the dropdown.
Default: text at 50%
-
--srfm-dropdown-icon-colorArrow icon.
Default: text at 65%
-
--srfm-dropdown-icon-disabledArrow icon when disabled.
Default: text at 25%
-
--srfm-expandable-menu-backgroundBackground of the open menu.
Default: #ffffff
-
--srfm-dropdown-menu-border-colorBorder of the open menu.
Default: text at 10%
-
--srfm-dropdown-option-text-colorOption text.
Default: text at 80%
-
--srfm-dropdown-option-background-hoverOption background on hover.
Default: text at 10%
-
--srfm-dropdown-option-background-selectedBackground of the selected option.
Default: text at 5%
-
--srfm-dropdown-option-selected-textText of the selected option.
Default: text
-
--srfm-dropdown-option-selected-iconCheckmark next to the selected option.
Default: text at 65%
-
--srfm-dropdown-badge-backgroundMulti-select badge background.
Default: text at 5%
-
--srfm-dropdown-badge-background-hoverMulti-select badge background on hover.
Default: text at 10%
-
--srfm-dropdown-badge-delete-iconBackground of the remove button on a badge.
Default: #dc2626
Typography
Defaults with three values follow the form’s Field spacing setting: small / medium / large.
-
--srfm-font-sizeBase font size of the form.
Default: 16px
-
--srfm-label-font-sizeLabel size.
Default: 14px / 16px / 18px
-
--srfm-label-line-heightLabel line height.
Default: 20px / 24px / 28px
-
--srfm-label-font-weightLabel weight.
Default: 500
-
--srfm-input-field-font-sizeInput text size.
Default: 14px / 16px / 18px
-
--srfm-input-field-line-heightInput text line height.
Default: 20px / 24px / 28px
-
--srfm-input-field-font-weightInput text weight.
Default: 400
-
--srfm-description-font-sizeHelp text size.
Default: 12px / 14px / 16px
-
--srfm-description-line-heightHelp text line height.
Default: 16px / 20px / 24px
-
--srfm-description-font-weightHelp text weight.
Default: 400
-
--srfm-description-margin-topSpace above help text.
Default: 2px
-
--srfm-error-font-sizeError message size.
Default: 12px
-
--srfm-error-line-heightError message line height.
Default: 16px
-
--srfm-error-font-weightError message weight.
Default: 500
-
--srfm-btn-font-sizeSubmit button text size.
Default: 14px / 16px / 18px
-
--srfm-btn-line-heightSubmit button line height.
Default: 20px / 24px / 28px
-
--srfm-btn-font-weightSubmit button text weight.
Default: 500
-
--srfm-checkbox-label-font-sizeCheckbox and GDPR label size.
Default: 14px / 16px / 18px
-
--srfm-checkbox-label-line-heightCheckbox and GDPR label line height.
Default: 20px / 24px / 28px
-
--srfm-checkbox-description-font-sizeHelp text under a checkbox.
Default: 12px / 14px / 16px
-
--srfm-checkbox-description-line-heightLine height of help text under a checkbox.
Default: 16px / 20px / 24px
-
--srfm-address-label-font-sizeAddress sub-field label size.
Default: 14px / 16px / 18px
-
--srfm-address-label-line-heightAddress sub-field label line height.
Default: 20px / 24px / 28px
-
--srfm-address-description-font-sizeAddress sub-field help text size.
Default: 12px / 14px / 16px
-
--srfm-address-description-line-heightAddress sub-field help text line height.
Default: 16px / 20px / 24px
-
--srfm-dropdown-font-sizeDropdown text size.
Default: 14px / 14px / 16px
-
--srfm-dropdown-font-weightDropdown text weight.
Default: 400
-
--srfm-dropdown-multiselect-font-sizeBadge text size in a multi-select dropdown.
Default: 12px / 12px / 14px
-
--srfm-dropdown-multiselect-line-heightBadge line height in a multi-select dropdown.
Default: 16px / 16px / 20px
Spacing and sizing
-
--srfm-row-gap-between-blocksVertical space between fields.
Default: 16px / 18px / 20px
-
--srfm-column-gap-between-blocksSpace between fields side by side.
Default: 16px
-
--srfm-input-heightInput height.
Default: 40px / 44px / 48px
-
--srfm-input-field-paddingPadding inside inputs.
Default: 10px 12px / 10px 12px / 10px 14px
-
--srfm-input-field-margin-topSpace between a label and its input.
Default: 4px / 6px / 8px
-
--srfm-input-field-margin-bottomSpace below an input.
Default: 4px / 6px / 8px
-
--srfm-input-label-gapLabel-to-input space. When set, it wins over --srfm-input-field-margin-top.
Default: not set
-
--srfm-input-field-border-radiusInput corner radius.
Default: 6px
-
--srfm-btn-paddingSubmit button padding.
Default: 8px 14px / 10px 14px / 10px 14px
-
--srfm-btn-border-radiusSubmit button corner radius.
Default: 6px
-
--srfm-row-gap-between-fieldsSpace between rows of address sub-fields.
Default: 12px / 16px / 20px
-
--srfm-col-gap-between-fieldsSpace between address sub-fields side by side.
Default: 12px / 16px / 16px
-
--srfm-gap-below-address-labelSpace under the address field’s main label.
Default: 12px / 14px / 16px
-
--srfm-flag-section-paddingPadding around the country flag in phone fields.
Default: 10px 0 10px 12px
-
--srfm-gap-between-icon-textSpace between an icon and text inside a field.
Default: 8px
Checkboxes and GDPR
-
--srfm-check-ctn-widthCheckbox width.
Default: 16px / 16px / 20px
-
--srfm-check-ctn-heightCheckbox height.
Default: 16px / 16px / 20px
-
--srfm-check-svg-sizeCheckmark size.
Default: 10px / 10px / 14px
-
--srfm-check-svg-leftMoves the checkmark horizontally.
Default: 2px
-
--srfm-check-svg-topMoves the checkmark vertically.
Default: 2px
-
--srfm-check-gapSpace between the box and its label.
Default: 8px / 8px / 10px
-
--srfm-checkbox-input-border-radiusCheckbox corner radius.
Default: 4px
-
--srfm-checkbox-margin-top-frontendNudges the box down to line up with the first line of the label.
Default: 2px / 4px / 4px
-
--srfm-checkbox-description-margin-leftIndent of help text under a checkbox.
Default: 24px / 24px / 30px
Dropdown sizing
-
--srfm-dropdown-option-paddingPadding of each option.
Default: 8px 12px
-
--srfm-dropdown-menu-paddingPadding inside the open menu.
Default: 6px
-
--srfm-dropdown-gap-between-input-menuSpace between the dropdown and its open menu.
Default: 4px / 4px / 6px
-
--srfm-dropdown-menu-icon-gapSpace between an option’s text and its checkmark.
Default: 8px
-
--srfm-dropdown-padding-rightRight padding of the dropdown.
Default: 12px / 12px / 14px
-
--srfm-dropdown-padding-right-iconRight padding including room for the arrow.
Default: padding-right + 20px
-
--srfm-dropdown-multiselect-paddingPadding of a multi-select dropdown.
Default: 8px, room for arrow
-
--srfm-dropdown-badge-paddingPadding of multi-select badges.
Default: 2px 6px / 2px 6px / 6px 6px
-
--srfm-dropdown-badge-gapSpace between badges.
Default: 6px
-
--srfm-dropdown-badge-icon-gapSpace between a badge’s text and its remove button.
Default: 6px
Multi-choice
-
--srfm-multi-choice-horizontal-paddingPadding of option cards in the horizontal layout.
Default: 16px / 20px / 24px
-
--srfm-multi-choice-vertical-paddingPadding of option cards in the vertical layout.
Default: 16px / 20px / 24px
-
--srfm-multi-choice-internal-option-gapSpace between an option’s text and its icon.
Default: 8px / 8px / 12px
-
--srfm-multi-choice-outer-paddingPadding around the whole group of options.
Default: 0 / 2px / 4px
-
--srfm-multi-choice-horizontal-svg-sizeIcon size in the horizontal layout.
Default: 16px
-
--srfm-multi-choice-vertical-svg-sizeIcon size in the vertical layout.
Default: 32px / 40px / 48px
-
--srfm-multi-choice-horizontal-image-sizeImage size in the horizontal layout.
Default: 20px / 24px / 28px
-
--srfm-multi-choice-vertical-image-sizeImage size in the vertical layout.
Default: 100px / 120px / 140px
Form box and background
These apply to the container itself, so set them on .srfm-form-container.srfm-form-container-{id}, not inside the form editor’s Custom CSS box.
-
--srfm-form-padding-topForm padding, top. Also -right, -bottom and -left.
Default: Style tab
-
--srfm-form-border-radius-topForm corner radius, top left. Also -right, -bottom and -left.
Default: Style tab
-
--srfm-instant-form-padding-topPadding on the form’s own page (Instant Form). Also -right, -bottom and -left.
Default: 32px
-
--srfm-instant-form-border-radius-topCorner radius on the form’s own page. Also -right, -bottom and -left.
Default: Instant Form settings
-
--srfm-form-container-widthWidth of the form on its own page.
Default: Instant Form settings
-
--srfm-bg-colorBackground color. Used when the container has .srfm-bg-color.
Default: Style tab
-
--srfm-bg-gradientBackground gradient. Used with .srfm-bg-gradient.
Default: Style tab
-
--srfm-bg-imageBackground image, as url(…). Used with .srfm-bg-image.
Default: Style tab
-
--srfm-bg-positionBackground image position. Also --srfm-bg-size, --srfm-bg-repeat, --srfm-bg-attachment.
Default: Style tab
-
--srfm-bg-overlay-colorOverlay color over the background image.
Default: Style tab
-
--srfm-bg-overlay-gradientOverlay gradient.
Default: Style tab
-
--srfm-bg-overlay-imageOverlay image.
Default: Style tab
-
--srfm-bg-overlay-opacityOverlay opacity, 0 to 1.
Default: Style tab
-
--srfm-bg-overlay-blend-modeOverlay blend mode.
Default: Style tab
-
--srfm-bg-overlay-positionOverlay image position. Also -size, -repeat, -attachment.
Default: Style tab
Rich text (textarea)
-
--srfm-quill-editor-colorAccent color of the rich text toolbar (active buttons and picked items).
Default: primary
Selectors
Form structure
-
.srfm-form-containerOuter wrapper of every form. Carries background classes, padding and corner radius.
-
.srfm-form-container-{id}One specific form. The number is the form’s post ID. Use it to scope your CSS.
-
.srfm-form-container-{id}-{blockId}Added when the same form is embedded more than once with its own block settings. Inspect the page to find it.
-
.srfm-formThe <form> element inside the container.
-
.srfm-form-titleForm title, when shown.
-
.srfm-submit-containerRow holding the submit button.
-
.srfm-submit-container .wp-block-buttonWrapper around the submit button; carries its alignment and width.
-
#srfm-submit-btnThe submit <button>. It also has .srfm-button, .srfm-submit-button and .srfm-btn-frontend.
-
.srfm-submit-wrapInside the button: holds the text and the loader.
-
.srfm-loaderSpinner shown while the form sends.
-
.srfm-success-boxMessage shown after a successful submission.
-
.srfm-success-box-descriptionText of the success message.
-
.srfm-head-error / .srfm-footer-errorForm-level error messages at the top and bottom.
-
.srfm-validation-errorError shown when the CAPTCHA isn’t completed.
-
.srfm-captcha-containerWrapper around the CAPTCHA.
-
.srfm-password-protected-formPassword prompt shown before a protected form.
-
.srfm-form-restriction-wrapperMessage shown when a form is closed (entry limit or schedule).
-
.srfm-form-restriction-message / .srfm-form-restriction-icon / .srfm-form-restriction-textParts of the closed-form message.
Container classes
-
.srfm-styling-noneAdded when “Disable default styles” is on. Style from scratch under it.
-
.srfm-submit-button-hiddenAdded when the submit button is hidden by the form’s settings.
-
.srfm-bg-color / .srfm-bg-gradient / .srfm-bg-imageBackground type chosen in the Style tab.
-
.srfm-overlay-color / .srfm-overlay-gradient / .srfm-overlay-imageOverlay type chosen in the Style tab.
-
.srfm-neve-theme-add-margin-bottomAdded on the Neve theme to keep space above the footer.
Field blocks
-
.srfm-blockEvery field.
-
.srfm-block-singleA field with one input.
-
.srfm-{type}-blockOne field type, such as .srfm-input-block, .srfm-email-block, .srfm-textarea-block, .srfm-dropdown-block.
-
.srfm-slug-{field-slug}One specific field. The slug comes from the field, for example .srfm-slug-email-address; inspect the form to find it.
-
.srfm-block-width-100 / -75 / -66-66 / -50 / -33-33 / -25Field width set in the editor.
-
.srfm-block-labelField label.
-
.srfm-block-legendGroup label (legend) of checkbox and multi-choice fields.
-
.srfm-requiredRequired asterisk.
-
.srfm-block-wrapWrapper around a field’s input.
-
.srfm-descriptionHelp text.
-
.srfm-error-wrapWrapper around the error message.
-
.srfm-error-messageError message.
-
.srfm-char-counter-wrap / .srfm-char-counterCharacter counter on text fields.
Inputs and states
-
.srfm-input-commonEvery text-style input and textarea.
-
.srfm-input-{type}One input type, such as .srfm-input-input, .srfm-input-email, .srfm-input-textarea, .srfm-input-number, .srfm-input-phone.
-
.srfm-input-contentWrapper of inputs with a prefix or suffix.
-
.srfm-number-prefix / .srfm-number-suffixPrefix and suffix on number fields.
-
.srfm-errorAdded to .srfm-block when the field has an error.
-
.srfm-valid-email-errorAdded to .srfm-block when an email address isn’t valid.
-
.srfm-read-onlyAdded to read-only fields.
Checkbox, GDPR and multi-choice
-
.srfm-checkbox-block / .srfm-gdpr-blockCheckbox and GDPR fields.
-
.srfm-cbxThe drawn checkbox next to the label.
-
.srfm-multi-choice-blockMulti-choice field.
-
.srfm-multi-choice-singleOne option. Holds the hidden input and the visible card. It has 4px padding and no border.
-
.srfm-input-multi-choice-singleThe hidden radio or checkbox inside an option.
-
.srfm-block-content-wrapThe visible option card: border, background and radius live here.
-
.srfm-option-containerLabel and optional icon or image inside a card.
-
.srfm-option-icon / .srfm-option-imageOption icon or image.
-
.srfm-icon-containerHolds the checked and unchecked icons.
-
.srfm-multi-choice-icon / .srfm-multi-choice-icon-uncheckedIcon shown when checked, and when not.
-
.srfm-choice-width-100 / -75 / -66-66 / -50 / -33-33 / -25Options per row; on .srfm-block-wrap.
-
.srfm-vertical-layoutOn .srfm-block-wrap for the vertical card layout.
Dropdown, phone, address and text
-
.srfm-dropdown-common-wrapDropdown wrapper.
-
.srfm-dropdown-common .ts-controlThe visible dropdown box (Tom Select).
-
.srfm-dropdown-common.input-activeDropdown while open or focused.
-
.ts-dropdown / .ts-dropdown .optionOpen menu and its options.
-
.srfm-phone-block / .srfm-input-phonePhone field and its input.
-
.srfm-address-blockAddress field.
-
.srfm-address-country-wrapCountry picker in the address field.
-
.srfm-email-confirm-blockThe “confirm email” input.
-
.srfm-textarea-block / .srfm-richtextTextarea field and its rich text editor.
-
.srfm-quill-editor-focusedRich text editor while focused.
Payments
-
.srfm-payment-blockPayment field.
-
.srfm-payment-field-wrapperAmount and method area.
-
.srfm-payment-input-wrapper / .srfm-payment-amount-wrapperAmount input and the shown amount.
-
.srfm-payment-methods-accordionPayment method list.
-
.srfm-payment-method-radio / .srfm-payment-activeA payment method and the chosen one.
-
.srfm-single-payment-methodWrapper when there is only one method.
-
.srfm-variable-amount-displayAmount for variable-price fields.
-
.srfm-paypal-button-containerPayPal button.
-
.srfm-test-mode-noticeBanner shown in test mode.
Form page (Instant Form)
The form’s own page has the body class .single-sureforms_form.
-
.srfm-single-page-containerPage wrapper.
-
.srfm-page-banner / .srfm-single-banner-titleBanner and title above the form.
-
.srfm-site-logoSite logo on the page.
-
.srfm-has-cover-img / .srfm-has-banner-page-bgAdded when a cover image or banner background is set.
Payment history [srfm_payment_history]
-
.srfm-pd-widgetThe whole payment history.
-
.srfm-pd-section / .srfm-pd-section-titlePayments and subscriptions sections.
-
.srfm-pd-pay-rowOne payment row.
-
.srfm-pd-panel / .srfm-pd-overlayDetail panel and its backdrop.
-
.srfm-pd-paginationPage links.
Recipes
Where your CSS goes, and how to scope it
For Appearance → Additional CSS or a child theme, use both container classes. With only .srfm-form-container-456, the values SureForms prints in the page win.
/* Appearance → Additional CSS or child theme. Replace 456 with your form ID. */
.srfm-form-container.srfm-form-container-456 {
--srfm-color-scheme-primary: #1d4ed8;
}
/* All SureForms forms on the site */
.srfm-form-container.srfm-form-container {
--srfm-input-field-border-radius: 10px;
}
The form editor’s Custom CSS box
SureForms nests this box inside the form’s own rule on embedded forms, but prints it as is on the form’s own page. Leave out the form ID and container class, set variables on .srfm-form, and avoid > and &: SureForms escapes them and the rule is dropped.
/* Form editor → Custom CSS. No form ID here. */
.srfm-form {
--srfm-color-scheme-primary: #1d4ed8;
--srfm-input-field-border-radius: 10px;
}
.srfm-block-label {
letter-spacing: 0.02em;
}
Dark form
SureForms works out input tints from the colors in the Style tab, so changing --srfm-color-scheme-text alone won’t recolor them. Set each one, as below. --srfm-bg-color needs Background set to Color in the Style tab.
.srfm-form-container.srfm-form-container-456 {
--srfm-color-scheme-primary: #3b82f6;
--srfm-color-scheme-text-on-primary: #ffffff;
--srfm-color-scheme-text: #e2e8f0;
--srfm-color-input-label: #e2e8f0;
--srfm-color-input-text: #f8fafc;
--srfm-color-input-description: #94a3b8;
--srfm-color-input-placeholder: #64748b;
--srfm-color-input-prefix: #94a3b8;
--srfm-color-input-background: #1e293b;
--srfm-color-input-background-hover: #24324a;
--srfm-color-input-border: #334155;
--srfm-color-multi-choice-svg: #94a3b8;
--srfm-expandable-menu-background: #1e293b;
--srfm-dropdown-option-text-color: #e2e8f0;
--srfm-dropdown-option-selected-text: #ffffff;
--srfm-dropdown-option-background-hover: #24324a;
--srfm-dropdown-placeholder-color: #64748b;
--srfm-dropdown-icon-color: #94a3b8;
--srfm-dropdown-menu-border-color: #334155;
--srfm-error-color: #f87171;
--srfm-bg-color: #0f172a;
}
Compact form
Or pick Small under Field spacing in the Style tab, which sets most of these for you.
.srfm-form-container.srfm-form-container-456 {
--srfm-row-gap-between-blocks: 12px;
--srfm-input-height: 36px;
--srfm-input-field-padding: 8px 10px;
--srfm-input-field-margin-top: 2px;
--srfm-label-font-size: 13px;
--srfm-btn-padding: 8px 20px;
--srfm-form-padding-top: 16px;
--srfm-form-padding-right: 16px;
--srfm-form-padding-bottom: 16px;
--srfm-form-padding-left: 16px;
}
Restyle one field
Every field has a .srfm-slug-{slug} class. Setting variables on it changes just that field, with no specificity fights.
/* Inspect the field to find its slug */
.srfm-form-container.srfm-form-container-456 .srfm-slug-email-address {
--srfm-color-input-border: #1d4ed8;
--srfm-color-input-background: #eef2ff;
--srfm-input-height: 52px;
}
Full-width submit button
Setting Button alignment to Full width in the form editor does the same without CSS.
.srfm-form-container.srfm-form-container-456 .srfm-submit-container .wp-block-button,
.srfm-form-container.srfm-form-container-456 #srfm-submit-btn {
width: 100%;
}
Gradient submit button
.srfm-form-container.srfm-form-container-456 #srfm-submit-btn {
background: linear-gradient(135deg, #1d4ed8, #6366f1);
border: 0;
}
.srfm-form-container.srfm-form-container-456 #srfm-submit-btn:hover {
background: linear-gradient(135deg, #1e40af, #4f46e5);
box-shadow: 0 6px 20px rgba(29, 78, 216, 0.35);
}
Multi-choice: solid checked cards
The visible card is .srfm-block-content-wrap, not .srfm-multi-choice-single (that is a padded wrapper). For a lighter tint, just set --srfm-color-input-selected.
.srfm-form-container.srfm-form-container-456 .srfm-form .srfm-multi-choice-block .srfm-block-wrap .srfm-multi-choice-single input:checked + .srfm-block-content-wrap {
background: #1d4ed8;
border-color: #1d4ed8;
color: #ffffff;
}
/* Checkmark: the icon’s stroke is set in CSS, so override it there */
.srfm-form-container.srfm-form-container-456 .srfm-form .srfm-multi-choice-block .srfm-block-wrap .srfm-multi-choice-single input:checked + .srfm-block-content-wrap .srfm-multi-choice-icon svg path {
stroke: #ffffff;
}
Multi-choice as pills
.srfm-form-container.srfm-form-container-456 .srfm-form .srfm-multi-choice-block .srfm-block-wrap {
gap: 8px;
}
.srfm-form-container.srfm-form-container-456 .srfm-form .srfm-multi-choice-block .srfm-block-wrap .srfm-multi-choice-single {
width: auto;
padding: 0;
}
.srfm-form-container.srfm-form-container-456 .srfm-form .srfm-multi-choice-block .srfm-block-wrap .srfm-multi-choice-single .srfm-block-content-wrap {
border-radius: 999px;
padding: 8px 18px;
min-height: 0;
}
.srfm-form-container.srfm-form-container-456 .srfm-form .srfm-multi-choice-block .srfm-block-wrap .srfm-multi-choice-single .srfm-block-content-wrap .srfm-icon-container {
display: none;
}
.srfm-form-container.srfm-form-container-456 .srfm-form .srfm-multi-choice-block .srfm-block-wrap .srfm-multi-choice-single input:checked + .srfm-block-content-wrap {
background: #1d4ed8;
border-color: #1d4ed8;
color: #ffffff;
}
Dropdown menu
The dropdown box already follows the input variables. The open menu (Tom Select) can be styled like this.
.srfm-form-container.srfm-form-container-456 .srfm-form .srfm-block .srfm-dropdown-common-wrap .srfm-dropdown-common .ts-dropdown {
border-radius: 12px;
box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}
.srfm-form-container.srfm-form-container-456 .srfm-form .srfm-block .srfm-dropdown-common-wrap .srfm-dropdown-common .ts-dropdown .option.active {
background: #eef2ff;
}
Heading with a line
For the Advanced Heading block placed inside a form.
.srfm-form-container.srfm-form-container-456 .wp-block-uagb-advanced-heading {
display: flex;
align-items: center;
gap: 16px;
}
.srfm-form-container.srfm-form-container-456 .wp-block-uagb-advanced-heading::after {
content: "";
flex: 1;
height: 1px;
background: #e2e8f0;
}
.srfm-form-container.srfm-form-container-456 .uagb-heading-text {
margin: 0;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
}
Form page vs embedded form
The form’s own page has the body class .single-sureforms_form.
/* Only on the form's own page (Instant Form) */
.single-sureforms_form .srfm-form-container.srfm-form-container-456 {
--srfm-color-scheme-primary: #059669;
}
/* Only where the form is embedded */
body:not(.single-sureforms_form) .srfm-form-container.srfm-form-container-456 {
--srfm-color-scheme-primary: #1d4ed8;
}
Business CSS
These need SureForms Business (or any paid plan; they all include the same features). Field, button and Next/Back colors also need a form theme other than Default.
Field borders and shadows
BusinessOnly applied when the form container has .srfm-custom-stylings (see How it works).
-
--srfm-field-border-width-topInput border width, top. Also -right, -bottom and -left.
Default: Style tab
-
--srfm-field-border-radius-topInput corner radius, top left. Also -right, -bottom and -left.
Default: Style tab
-
--srfm-field-box-shadow-normalInput shadow at rest.
Default: Style tab
-
--srfm-field-box-shadow-focusInput shadow when focused.
Default: Style tab
Submit button
BusinessOnly applied with .srfm-custom-stylings.
-
--srfm-button-padding-topButton padding, top. Also -right, -bottom and -left.
Default: Style tab
-
--srfm-button-border-radius-topButton corner radius, top left. Also -right, -bottom and -left.
Default: Style tab
-
--srfm-button-border-width-topButton border width, top. Also -right, -bottom and -left.
Default: Style tab
-
--srfm-button-border-styleButton border style, such as solid or none.
Default: Style tab
-
--srfm-button-border-colorButton border color.
Default: Style tab
-
--srfm-button-border-hover-colorButton border color on hover.
Default: Style tab
-
--srfm-button-background-color-normalButton color. Used when the button has .srfm-btn-bg-color.
Default: Style tab
-
--srfm-button-background-color-hoverButton color on hover (.srfm-btn-bg-hover-color).
Default: Style tab
-
--srfm-button-background-gradient-normalButton gradient (.srfm-btn-bg-gradient).
Default: Style tab
-
--srfm-button-background-gradient-hoverButton gradient on hover (.srfm-btn-bg-hover-gradient).
Default: Style tab
-
--srfm-button-text-color-normalButton text color.
Default: Style tab
-
--srfm-button-text-color-hoverButton text color on hover.
Default: Style tab
-
--srfm-btn-color-disabledButton color while disabled.
Default: primary at 25%
Multi-step forms (page break)
Business-
--srfm-page-break-indicator-sizeSize of the step circles.
Default: 24px
-
--srfm-page-break-indicator-text-colorNumber inside a step circle.
Default: Style tab
-
--srfm-page-break-steps-filledCompleted step circles.
Default: Style tab
-
--srfm-page-break-steps-unfilledUpcoming step circles.
Default: Style tab
-
--srfm-page-break-steps-progressFill of the progress bar.
Default: Style tab
-
--srfm-page-break-steps-pending-text-colorNumber in upcoming step circles.
Default: Style tab
-
--srfm-page-break-unfilled-progressTrack of the progress bar.
Default: Style tab
-
--srfm-page-break-connector-activeLine between finished steps.
Default: Style tab
-
--srfm-page-break-connector-pendingLine between upcoming steps.
Default: Style tab
-
--srfm-page-break-connector-checkedLine after a completed step.
Default: Style tab
-
--srfm-page-break-step-gapSpace between step circles.
Default: clamp(0.4em, 1.2vw, 1.6em)
-
--srfm-page-break-row-gapSpace under the step indicator.
Default: 24px
-
--srfm-page-break-next-btn-bg-normalNext button background. Also -bg-hover.
Default: Style tab
-
--srfm-page-break-next-btn-color-normalNext button text. Also -color-hover.
Default: Style tab
-
--srfm-page-break-next-btn-border-color-normalNext button border. Also -border-color-hover.
Default: Style tab
-
--srfm-page-break-back-btn-bg-normalBack button background. Also -bg-hover.
Default: Style tab
-
--srfm-page-break-back-btn-color-normalBack button text. Also -color-hover.
Default: Style tab
-
--srfm-page-break-back-btn-border-color-normalBack button border. Also -border-color-hover.
Default: Style tab
-
--srfm-page-break-back-btn-backgroundBack button background on the Default theme.
Default: text at 5%
-
--srfm-page-break-back-btn-text-colorBack button text on the Default theme.
Default: text at 80%
Business field types
Business-
--srfm-datepicker-dropdown-input-gapSpace between a date input and its calendar.
Default: 4px
-
--srfm-rating-icon-sizeRating icon size.
Default: 24px
-
--srfm-rating-icon-gapSpace between rating icons.
Default: 4px
-
--srfm-slider-margin-topSpace above the slider track.
Default: label gap + 32px
-
--srfm-slider-thumb-shadow-colorShadow of the slider handle.
Default: text at 10%
-
--srfm-slider-label-font-sizeSlider min and max label size.
Default: 12px
-
--srfm-slider-label-line-heightSlider label line height.
Default: 16px
-
--srfm-slider-label-top-paddingSpace above slider labels.
Default: 6px
-
--srfm-slider-error-gapSpace between the slider and its error.
Default: 4px
-
--srfm-upload-vertical-paddingPadding of the upload drop zone.
Default: 24px
-
--srfm-upload-inner-gapSpace between items in the drop zone.
Default: 12px
-
--srfm-upload-preview-sizeSize of image previews after uploading.
Default: 40px
-
--srfm-upload-file-margin-topSpace above the uploaded file list.
Default: 12px
-
--srfm-upload-text-line-heightLine height of drop zone text.
Default: 20px
-
--srfm-signature-canvas-heightHeight of the signature pad.
Default: 120px
-
--srfm-signature-button-bottomPosition of the clear button on the signature pad.
Default: 12px
-
--srfm-address-input-marginMargin around address autocomplete inputs.
Default: 4px 0
-
--srfm-login-row-gapSpace between rows in login and registration forms.
Default: 12px
-
--srfm-color-input-border-focusBorder of the color picker field when focused.
Default: not set
Password strength
Business-
--srfm-password-strength-weakWeak password color.
Default: #DC2626
-
--srfm-password-strength-mediumMedium password color.
Default: #D97706
-
--srfm-password-strength-strongStrong password color.
Default: #16A34A
-
--srfm-password-strength-weak-border-colorInput border for a weak password. Also -medium- and -strong-.
Default: weak at 65%
-
--srfm-password-strength-weak-border-glowFocus ring for a weak password. Also -medium- and -strong-.
Default: weak at 15%
Conversational forms
Business-
--srfm-conversational-element-widthWidth of each question.
Default: 640px
-
--srfm-common-heading-font-sizeWelcome and thank-you heading size.
Default: 36px
-
--srfm-common-heading-line-heightHeading line height.
Default: 48px
-
--srfm-common-message-font-sizeWelcome and thank-you message size.
Default: 16px
-
--srfm-common-message-line-heightMessage line height.
Default: 24px
-
--srfm-checkbox-label-font-weightCheckbox label weight in conversational forms.
Default: 500
Theme and button classes
Business-
.srfm-custom-stylingsOn the container when the form’s theme is Custom, Baseline, Minimal, Dark or a saved preset. Not added on the Default theme.
-
.srfm-preset-{theme}The chosen theme: .srfm-preset-custom, -baseline, -minimal, -dark.
-
.srfm-btn-bg-color / .srfm-btn-bg-gradient / .srfm-btn-bg-transparentButton background type.
-
.srfm-btn-bg-hover-color / .srfm-btn-bg-hover-gradient / .srfm-btn-bg-hover-transparentButton background type on hover.
Multi-step forms
Business-
.srfm-page-breakOne step of the form.
-
.srfm-page-break-header-containerStep indicator area.
-
.srfm-steps-container / .srfm-page-break-stepsStep circles.
-
.srfm-progress-connectorList of step circles in the progress bar style.
-
.srfm-circle-shape / .srfm-circle-textA step circle and its number. Its li gets .active (current) or .filled (done).
-
.srfm-page-break-progress-container / .srfm-page-break-progressProgress bar track and fill.
-
.srfm-steps-page-titleTitle of the current step.
-
.srfm-page-break-buttonsNext and back buttons row.
-
.srfm-nxt-btn / .srfm-pre-btnNext and back buttons.
Business fields
Business-
.srfm-datepicker-block / .datepicker-pickerDate field and its calendar.
-
.datepicker-cell.selected / .datepicker-cell.disabledChosen and unavailable days.
-
.srfm-time-picker-block / .srfm-input-time-pickerTime field and its input.
-
.srfm-upload-block / .srfm-upload-wrapUpload field and drop zone.
-
.srfm-classic-upload-labelButton-style upload label.
-
.srfm-upload-data / .srfm-upload-data-filename / .srfm-upload-data-sizeAn uploaded file row and its name and size.
-
.srfm-upload-previewImage preview of an upload.
-
.srfm-rating-blockRating field.
-
.srfm-nps-block / .srfm-nps-buttons / .srfm-nps-btnNPS field, its buttons row and one button.
-
.srfm-nps-selectedThe chosen NPS score.
-
.srfm-nps-detractor-bg / .srfm-nps-passive-bg / .srfm-nps-promoter-bgNPS colors for 0–6, 7–8 and 9–10.
-
.srfm-slider-block / .srfm-slider-wrapSlider field and track area.
-
.srfm-slider-thumb / .srfm-fillSlider handle and filled part of the track.
-
.srfm-text-sliderSlider with text options instead of numbers.
-
.srfm-signature-block / .srfm-signature-buttonsSignature field and its buttons.
-
.srfm-input-color-picker / .srfm-color-picker-swatchColor picker variant of the text field, and its swatch.
-
.srfm-input-address-autocompleteAddress autocomplete input.
-
.srfm-address-autocomplete-map-previewMap preview under address autocomplete.
-
.srfm-html-blockHTML block.
-
.srfm-with-icon / .srfm-input-iconField with an icon, and the icon.
-
.srfm-calculation-resultResult of a calculation field.
-
.srfm-repeater-block / .srfm-repeater-itemRepeater field and one row.
-
.srfm-repeater-item-header / .srfm-repeater-item-controlsRow header and its buttons.
-
.srfm-repeater-add-btn / .srfm-repeater-remove-btnAdd and remove row buttons.
Passwords, login and registration
Business-
.srfm-password-block / .srfm-password-confirm-blockPassword field and the confirm field.
-
.srfm-input-password / .srfm-password-iconPassword input and its show/hide icon.
-
.srfm-password-validateStrength meter under the password field.
-
.srfm-strength-1 to .srfm-strength-5Strength level classes on the meter.
-
.srfm-login-block / .srfm-register-blockLogin and registration forms.
-
.srfm-lost-password-block / .srfm-reset-password-blockLost and reset password forms.
-
.srfm-logged-in-messageMessage shown to visitors who are already logged in.
Conversational forms
Business-
.srfm-cf-ctnConversational form wrapper.
-
.srfm-cf-welcome-screen / .srfm-cf-welcome-heading / .srfm-cf-welcome-messageWelcome screen and its text.
-
.srfm-cf-welcome-image-ctn / .srfm-cf-welcome-imageWelcome image.
-
.srfm-cf-start-btnStart button.
-
.srfm-cf-next-btn / .srfm-cf-prev-btnNext and previous buttons.
-
.srfm-cf-progress-bar-ctn / .srfm-cf-progress-bar / .srfm-cf-progress-bar-percentageProgress bar and percentage.
-
.srfm-cf-nav-helper-text“Press Enter” hint.
Save and resume
Business-
.srfm-save-resume-link“Save and resume later” link.
-
.srfm-save-resume-message / .srfm-resume-url-containerMessage and link shown after saving.
Entries table and survey results
BusinessFront-end displays added with [srfm_show_entries] and [sureforms_survey_results].
-
.srfm-entries / .srfm-entries-tableEntries table and its table element.
-
.srfm-entries-sort / .srfm-entries-paginationSort controls and page links.
-
.srfm-entries-file / .srfm-entries-bool--yes / .srfm-entries-bool--noFile links and yes/no values in cells.
-
.srfm-survey-resultsSurvey results.
-
.srfm-survey-bar-row / .srfm-survey-bar-fillOne answer bar and its fill.
-
.srfm-survey-nps-bar / .srfm-survey-nps-scoreNPS summary bar and score.
Business recipes
Underline-only inputs
BusinessNeeds SureForms Business and a form theme other than Default (Custom, Baseline, Minimal, Dark or a saved preset), which adds .srfm-custom-stylings.
.srfm-form-container-456.srfm-custom-stylings {
--srfm-field-border-width-top: 0px;
--srfm-field-border-width-right: 0px;
--srfm-field-border-width-bottom: 2px;
--srfm-field-border-width-left: 0px;
--srfm-field-border-radius-top: 0px;
--srfm-field-border-radius-right: 0px;
--srfm-field-border-radius-bottom: 0px;
--srfm-field-border-radius-left: 0px;
--srfm-field-box-shadow-normal: none;
--srfm-field-box-shadow-focus: none;
--srfm-color-input-background: transparent;
}
Gradient button with the Business controls
BusinessPick a gradient for the button in the Style tab first; that adds .srfm-btn-bg-gradient to the button.
.srfm-form-container-456.srfm-custom-stylings .srfm-button.srfm-btn-bg-gradient {
--srfm-button-background-gradient-normal: linear-gradient(135deg, #1d4ed8, #6366f1);
--srfm-button-background-gradient-hover: linear-gradient(135deg, #1e40af, #4f46e5);
--srfm-button-text-color-normal: #ffffff;
--srfm-button-text-color-hover: #ffffff;
}
Multi-step progress colors
Business.srfm-form-container.srfm-form-container-456 {
--srfm-page-break-indicator-size: 28px;
--srfm-page-break-steps-filled: #1d4ed8;
--srfm-page-break-steps-unfilled: #e2e8f0;
--srfm-page-break-indicator-text-color: #ffffff;
--srfm-page-break-connector-active: #1d4ed8;
--srfm-page-break-connector-pending: #e2e8f0;
--srfm-page-break-steps-progress: #1d4ed8;
--srfm-page-break-unfilled-progress: #e2e8f0;
}
/* Next/Back button colors apply with .srfm-custom-stylings */
.srfm-form-container-456.srfm-custom-stylings {
--srfm-page-break-next-btn-bg-normal: #1d4ed8;
--srfm-page-break-next-btn-bg-hover: #1e40af;
--srfm-page-break-next-btn-color-normal: #ffffff;
--srfm-page-break-next-btn-color-hover: #ffffff;
}
Password strength colors
Business.srfm-form-container.srfm-form-container-456 {
--srfm-password-strength-weak: #ef4444;
--srfm-password-strength-medium: #f59e0b;
--srfm-password-strength-strong: #10b981;
}
Nothing matches that search. Try a shorter word, like “border” or “button”.
Unofficial reference by Nahnu Media, not made or endorsed by the SureForms team. Checked against the SureForms 2.12.9 source code. SureForms can change these names in any update, so test on a staging site first.
Three Steps To
An On-Brand Form.
-
Find Your Form ID
Right-click your form and choose Inspect. The outer div’s class, like srfm-form-container-456, holds the ID.
-
Pick Your CSS
Search the variables and selectors, copy a tested recipe, or build an AI prompt that knows SureForms’ rules.
-
Paste And Check
Add it under Appearance → Additional CSS, swap in your form ID, and check the form on a staging site first.
Common
Questions.
Want your forms styled for you? Get in touch and we will take a look.
Where do I put custom CSS for SureForms?
In Appearance → Additional CSS or your child theme, starting each selector with .srfm-form-container.srfm-form-container-456 (your form ID instead of 456). Or use the form editor’s Custom CSS box, which is already limited to that form: leave out the form ID there.
Why isn’t my SureForms CSS working?
Usually because the selector starts with only .srfm-form-container-456. SureForms prints its own values in the page after your stylesheet, so they win. Add the second class, .srfm-form-container, in front. For element rules, copy SureForms’ selector path and start it the same way.
How do I find my form ID?
Right-click the form on your site and choose Inspect. Find the outer div whose class starts with srfm-form-container-. The number after it is the form ID. It’s also in the address bar when you edit the form.
Can I change the colors without CSS?
Yes. The form’s Style tab sets the main color and text color, and SureForms works out borders, backgrounds and placeholders from them. Use CSS when you need more control than the Style tab gives you.
Do I need SureForms Business?
No. Most of the reference works on the free plan. The Business tabs cover the paid fields and controls, like multi-step forms, uploads, per-side borders and button gradients. Some of those only apply when the form’s theme isn’t set to Default.
Will my CSS break when SureForms updates?
It can. Variables change less often than class names, so use them where you can. The reference shows which SureForms version it was checked against. Test updates on a staging site before your live one.
How does the AI prompt builder work?
Enter your form ID and what you want, then copy the prompt into Claude or ChatGPT and paste your form’s HTML under it. The prompt includes the whole reference and SureForms’ styling rules, so the CSS you get back fits your form.
Is this made by SureForms?
No. It’s a free, unofficial reference made by Nahnu Media from the SureForms source code. It isn’t endorsed by the SureForms team.
Want It Done
For You?
We build WordPress sites for fitness brands with on-brand forms, tracking and speed handled from the start. No fluff, no cookie-cutter proposals.