Forms
List reusable form blocks
/a/FormBlocks_list
List all reusable blocks of one exact type for editor selection controls.
When to use this endpoint
Use this to populate block pickers in report-document and email-template editors. It is unpaginated; use FormBlocks_getDT for a management table.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session and is scoped to the authenticated tenant.
The handler performs no form, department, owner, or page-permission check unless the page below says otherwise. CRM navigation may impose additional UI-only access rules.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | Integer-compatible | No | Exact type, default 0; type 1 selects email-template blocks. |
fields | JSON array string | No | Only image is accepted as an extra. ID and name are always returned. A native array is not supported by this handler. |
Example request
$blocks = FM_api('FormBlocks_list', [
'type' => '1',
'fields' => json_encode(['image']),
]);
Example response
{
"ok": 1,
"rows": [{"id": "4822", "name": "Standard footer", "image": null}]
}
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- The list has no explicit ordering or pagination.
- Unknown requested fields are ignored. Empty results still return
{"ok":1,"rows":[]}. - The type is integer-coerced and compared exactly.
See it in Fieldmotion
CRM1
Email-template and report-document editors use this list when inserting reusable blocks.
CRM2
The corresponding editors use the same endpoint, including notification-email configuration.
Related endpoints
FormBlock_getByNameexpands a selected name.FormBlocks_getDTprovides pagination.