Forms
Query the legacy Form Blocks table
/a/FormBlocks_getDT
Page through one block type for the legacy server-side Form Blocks tables.
When to use this endpoint
Use this for the CRM1-style management grid. Use FormBlocks_list for a lightweight selector or FormBlocks_getDataTable for mapped object rows.
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 |
|---|---|---|---|
order[0][column] | Integer-compatible | Yes | 0 orders by ID and 1 by name; every other value also falls back to name. |
order[0][dir] | String | Yes | Exact desc selects descending order; every other value becomes ascending. |
start | Integer-compatible | Yes | Zero-based offset; negative values are not rejected before SQL construction. |
length | Positive integer-compatible | Yes | Page size; must integer-coerce above zero. |
draw | Integer-compatible | Yes | DataTables sequence echoed as an integer. |
type | Integer-compatible | No | Exact block type; defaults to 0. CRM uses 0 for report blocks and 1 for email-template blocks. |
Example request
$table = FM_api('FormBlocks_getDT', [
'type' => '0',
'draw' => '3',
'start' => '0',
'length' => '25',
'order' => [['column' => '1', 'dir' => 'asc']],
]);
Example response
{
"draw": 3,
"recordsTotal": 18,
"recordsFiltered": 12,
"data": [["4821", "Service summary", "92442/formblocks/4821.png", "1790845200"]]
}
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. |
{"error":"missing or invalid parameter: [order][0][column]"} | Order column is absent. |
{"error":"missing or invalid parameter: [order][0][dir]"} | Direction is absent. |
{"error":"missing or invalid parameter: start"} | Start is absent. |
{"error":"missing or invalid parameter: length"} | Length is absent, zero, or negative. |
{"error":"missing or invalid parameter: draw"} | Draw is absent. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Rows are positional arrays: ID, name, image storage path, then Unix-seconds
last_edited. recordsTotalcounts both block types, whilerecordsFilteredcounts only the requested type.- There is no name search and no tie-break ordering.
See it in Fieldmotion
CRM1
The Form Blocks table sends type 0; Email Template Blocks sends type 1.
CRM2
Current block-management screens use the same legacy table endpoint.
Related endpoints
FormBlocks_listreturns unpaginated selector rows.FormBlock_getloads an editor row.