When to use this endpoint

Use the legacy Forms table-link replacement workflow. Despite its name, this is not an arbitrary field editor; only extras.values is supported. Read back the form after retargeting.

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
form_idPositive integer-compatible IDYesParent Form ID.
field_nameNonblank textYesThe supplied name must not be empty before trimming; matching uses its trimmed text. Whitespace-only input can pass validation but match no field.
update_paramExact text extras.valuesYesOnly accepted property path.
valueScalar textYesReplacement value, normally the linked Table Form ID. No positive-ID, target existence or target-type validation is performed.

Example request

$result = FM_api('Form_editField', [
	'form_id'=>'1042','field_name'=>'Inspection items',
	'update_param'=>'extras.values','value'=>'1088',
]);

Example response

{"id":1042,"ok":1}

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: form_id"}No positive parent ID.
{"error":"missing or invalid parameter: field_name"}Missing or empty field_name before trimming.
{"error":"invalid parameter: update_param"}Unsupported property path.

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

Behaviour and edge cases

  • No parent type or archived restriction. Iterates all matching exact field names and changes extras.values; a missing name still leads to a save and ok. Other update_param values return an error.
  • Prunes nameless field definitions while rewriting the array. The submitted scalar is addslashes-escaped before the array is JSON encoded, so quotes/backslashes can become stored literal escapes; use the plain numeric table ID for retargeting.
  • Synchronizes removed/added linked-table parent metadata. It does not migrate existing Job table answers to the replacement table, validate stable IDs or prove the target is a compatible table.

Side effects

  • Saves fields and last_edited, invalidates forms cache, synchronizes form_parents, records editfields history and creates Undo. These writes are not an atomic checked transaction.

See it in Fieldmotion

CRM1

In Forms, use the linked-table Replace action; its legacy merge-tables widget also calls Form_editField. Inspect form_id, field_name and value.

CRM2

In Forms, choose Replace beside a linked table. The request sends the parent form ID and exact field name with update_param=extras.values; this differs from the checked Job Table merge workflow.

Related endpoints