
- MODX 3
- PHP 8.2
- Vue 3


AJAX submit handler for the Pro form_builder section. The chunk calls it through PageBuilderFetchIt. Do not call this snippet from the resource template.
form_builder section with the same schema key. Uses the published document when publishedRevision > 0, otherwise the draft.Mail is always queued. The recipient is the schema email. An empty field sends to emailsender.
A webhook is queued only when webhook is not empty. It is sent only to an https:// URL.
A delivery error after commit does not change the success JSON.
Submissions are not stored. Capability forms is required.
Chunk pagebuilderpro_form_builder passes snippet = PageBuilderFormBuilder and form = pagebuilderpro_form_builder_fields into PageBuilderFetchIt.
There are no properties for a template call. Form POST:
| Field | Purpose |
|---|---|
pb_form_key | Schema key. An empty key is a validation error |
pb_csrf | Token. A bad token returns CSRF token is invalid. |
nospam | Honeypot. A filled field returns success and does not send mail |
Where to look for the section, same order as PageBuilderContactForm:
| Source | Priority |
|---|---|
POST pageId | 1 |
resource_id on the FetchIt action | 2 |
| current MODX resource | 3 |
The chunk also passes action keys form_key, form_csrf, successMessage, and validationErrorMessage. form_csrf on the action wins over the session token.
| Situation | Response |
|---|---|
| Missing section or schema | pagebuilder_fe_form_not_found |
No capability forms | pagebuilder_fe_form_unavailable |
| Too many requests | Too many requests. |
| Package | Why |
|---|---|
| pagebuilderpro | form_builder section, capability forms |
| FetchIt | AJAX and inline errors |