CMT Sites Documentation

Forms

Last modified with commit 93ec3fb on by Martin Jagodic.

Basic forms

They can be constructed via the CMS without the need for developers to set them up.

Fields in basic forms can include:

Text paragraphs and headings can be added between fields.

A basic form will include a submit button, a success message, and an error message.

CMS editor will be able to set recipient email addresses for form submissions.

Complex forms

A developer sets up the form and configures strings to be editable in the CMS.

For example: contact form is hardocded and documented on Contact Form page.

Processing form submissions

We have 2 options. Both use Cloudflare Pages Functions for the server-side handler, but they differ in portability and vendor coupling.

Option A: Cloudflare Static Forms Plugin (CF-specific)

What it is: A Pages Plugin that intercepts forms with the data-static-form-name attribute, parses the submission, and calls a respondWith handler in a Function.

Pros:

Cons:

Best for:

Option B: Custom Function + Brevo API/SMTP (Portable)

What it is: A custom endpoint (e.g. /api/forms/submit) that accepts form posts, validates them, and sends email via Brevo (API or SMTP).

Pros:

Cons:

Best for:

Recommendation

Use Option B (Custom Function + Brevo API/SMTP).