The Comment Blueprint

The comment blueprint controls submission, Control Panel editing, templates, and GraphQL. Its default path is resources/blueprints/meerkat.yaml. The JSON API currently uses a fixed field set.

#Required fields

Only comment must be defined in the blueprint. Meerkat adds author and system fields at runtime.

The default blueprint contains:

Handle Type Notes
comment textarea Required. Stored as comment_text; API responses also include sanitized comment_html.
name text Author display name. Required by default. Meerkat uses the signed-in user's name when available.
email text (email) Author email. Validated as required|email. Meerkat uses the signed-in user's email when available.
website text (url) Optional. Validated nullable|url.

Meerkat automatically adds system fields:

  • is_published, is_spam, thread_id, author_id, collection, and site are hidden in the comment editor but available to listings.
  • created_at, moderation_status, moderation_reason, and moderation_notes are visible and editable in the comment editor; moderation_notes does not appear in listings.

You can edit these fields, but do not add them to the submission form. config('meerkat.fields.exclude') excludes them from public forms.

#Customizing

From the Comments screen, choose Edit Comment Blueprint from the header actions. This requires Statamic's configure fields permission.

The YAML file uses standard Statamic blueprint conventions.

Anything you add becomes:

  • A field on the front-end {{ meerkat:form }} (if not in fields.exclude).
  • A column option in the table view (with listable: true).
  • A key in comment_data on save.
  • A value your templates and GraphQL can read.

Guest comments require name and email. Authenticated-only sites can hide those fields from rendered forms.

If you rename the body or author fields, update config('meerkat.fields.extractors.*') to map the custom handles to comment, name, and email.

#Unsupported fields

The submission form does not currently support assets or file fields.

Was this page helpful?