When to use this endpoint

Use as part of the legacy PDF-template editor’s page-removal sequence. The client separately removes the corresponding page from its layout JSON and saves the form afterwards. This call alone does not save the report layout.

Authentication and permissions

Authenticate with a signed API key (acting as its owner) or a logged-in CRM session on the routed account host. Session calls include the dispatcher’s CSRF value when configured. IDs refer to the authenticated tenant unless an explicit cross-account copy is described.

The handler adds no Forms page/role check. The dispatcher does not add a Form record-scope predicate; a screen’s CRM2 role controls are not evidence of an API restriction or a CRM1 permission requirement.

The account’s features2.disableFormEdits setting blocks this mutation with form edits are disabled for this account. A temporary user marked meta.is_tmp=1 bypasses that setting only.

Parameters

ParameterTypeRequiredDescription
idPositive integer-compatible IDYesForm whose AutoDoc image files are addressed; the handler does not verify the form row.
pageInteger-compatible indexNoZero-based page index used by the CRM1 thumbnail list; defaults 0. The handler does not validate range or prohibit removing the last page.

Example request

$result = FM_api('Form_pageRemove', ['id'=>'1042','page'=>'1']);

Example response

"ok"

Database numeric values can be JSON strings. Examples are representative; legacy application errors can use HTTP 200, so inspect the decoded response.

Errors and unusual responses

ResponseCondition
{"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: id"}Missing/nonpositive form ID.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • Enumerates saved image-* template assets, removes affected derived files, shifts subsequent PNG images down and removes the final PNG. File numbering and layout state must agree.
  • Returns the JSON string ok, not an object with an ok member. Missing files/form or an out-of-range index are not comprehensively checked. The UI prevents removing its final page, but the endpoint does not.
  • No field definition, AutoDoc JSON, timestamp, audit or Undo snapshot is saved by this route. There is no pagination.

Side effects

  • Mutates stored AutoDoc template files sequentially through the files library (AutoDoc type 9). No transaction/rollback spans those files; the caller’s subsequent Form save is a separate operation.

See it in Fieldmotion

CRM1

In the legacy PDF-template editor, remove a page from its thumbnails. Form_pageRemove receives the zero-based list index, then the editor triggers Save.

CRM2

No direct CRM2 caller found for this legacy page-image deletion route; its AutoDoc document editor saves document HTML through Form_updateData.

Related endpoints