Skip to content
  1. Extras
  2. PageBuilder
  3. Frontend output
  4. Snippets
  5. PageBuilderFormBuilder

Snippet PageBuilderFormBuilder

AJAX submit handler for the Pro form_builder section. The chunk calls it through PageBuilderFetchIt. Do not call this snippet from the resource template.

Purpose

Finds the published form_builder section with the same schema key, checks CSRF and the honeypot, writes the outbox in a transaction, and sends mail and the webhook after commit. Submissions are not stored. Capability forms is required.

Where it is called

Chunk pagebuilderpro_form_builder passes snippet = PageBuilderFormBuilder and form = pagebuilderpro_form_builder_fields into PageBuilderFetchIt.

Parameters

There are no properties for a template call. Form POST:

FieldPurpose
pb_form_keySchema key. An empty key is a validation error
pb_csrfToken. A bad token returns CSRF token is invalid.
nospamHoneypot. A filled field returns success and does not send mail

resource_id comes from the chunk properties or the current resource. A missing section or schema returns pagebuilder_fe_form_not_found. Without capability forms the response is pagebuilder_fe_form_unavailable. Too many requests return Too many requests.

Dependencies

PackageWhy
pagebuilderproform_builder section, capability forms
FetchItAJAX and inline errors

See also