Contact Form 7 Styler
Embed an existing Contact Form 7 form and customize its appearance directly in Bricks. The styler renders the source form; it does not replace Contact Form 7's form builder, submission handling, or email configuration.
Setup and First Use
Before starting, enable the relevant element or feature family under Bricks → BricksUltimate → General Elements, save, and reopen the Bricks editor. Integrations also require their corresponding plugin to be active.
- Install and activate Contact Form 7, then create and save the form in that plugin. Test its basic behavior before styling.
- Enable Contact Form 7 Styler under Bricks → BricksUltimate → General Elements and reopen the editor. The integration may be unavailable if its required plugin is inactive.
- Add (BU)CF7 Styler. Start with Source Type set to Choose from dropdown and select the saved Form.
- Style the form wrapper, labels, input fields, submit controls, and available feedback groups.
- If the form should change per record, switch Source Type to the available dynamic/custom-field mode and provide the intended form ID source.
- Save and test the frontend at desktop and mobile widths, including invalid input and a successful submission.
Controls and Settings
| Control | Purpose and usage |
|---|---|
| Source Type / Form | Choose a saved Contact Form 7 form for static placement, or the supported dynamic mode for record-specific forms. |
| Dynamic source | Custom Field reads a post meta key containing the Contact Form 7 form ID. Enter the key, not a complete shortcode. This control is not a general dynamic-tag input. |
| Wrapper / Input styles | Use width, spacing, typography, padding, backgrounds, borders, shadows, placeholders, and focus styles where offered. Avoid a fixed width that exceeds the form container. |
| Show form name / Form name tag | Optionally output a form heading and choose its semantic tag. Style it in the Name group. |
| Inline Errors / Message | Style field validation, success, validation-error, and failed-message states separately. |
Contact Form 7 Markup and Messages
Create fields and real labels in the Contact Form 7 editor. BU styles the rendered field markup; it does not add missing labels or create field validation rules. Use the correct message groups for invalid input versus a failed send. Third-party field add-ons can produce markup outside the selectors covered by this styler, so test those fields explicitly.
Dynamic Forms and Template Context
Store the form ID in the correct record metadata and preview a record that contains it. A post-based field and a term-based field are not interchangeable. Test at least two records with different IDs and one without a value. Keep one unambiguous source; do not assume an empty field will select a useful default form.
Submission, Email, and Accessibility
Configure recipients, sender settings, confirmation text, consent, spam protection, and any SMTP integration in Contact Form 7 or the relevant site email setup. Styling cannot repair mail delivery. Keep actual labels and clear error text; placeholders alone are not sufficient labels. Test keyboard focus and conditional fields. For popup/off-canvas use, test initialization on the first open and after AJAX updates.
Practical Example
Create a contact form with name, email, message, and consent in Contact Form 7. Select it in the styler, use consistent label/input spacing, then submit once with a missing required field and once with valid test data.
Troubleshooting
- Form missing: activate Contact Form 7, save a form, enable the styler, and reopen Bricks.
- Wrong form: inspect Source Type and the resolved form ID for the current record.
- Some fields ignore styling: inspect third-party field markup, the selected style group, and competing form-plugin CSS.
- Validation or email fails: test the original form and its processing/mail settings independently of BU styling.