update_form_element
Update a single form element by ID, merging changes shallowly. Since the API lacks single-element updates, it rewrites the entire element list, risking overwrites if others edit concurrently.
Instructions
Change one element, by rewriting the form's ENTIRE element list.
The API has no single-element update, so this tool reads every element, applies
changes to the one whose elementId matches, and writes all of them back
through the same whole-list PUT that replace_form_elements uses. The other
elements are sent back exactly as they were read — but they are sent, so an
edit someone else makes between the read and the write is silently
overwritten. The operation is NOT atomic, and the endpoint offers no version
field, ETag or conditional header that would detect the conflict.
changes is merged shallowly, one level deep: each key replaces that key's
value on the element outright. Nested lists are NOT merged item by item —
passing answerOptions replaces the element's whole answer-option list, so to
edit one option you must send all of them, each keeping its answerOptionId,
in the order you want. The same goes for subElements and validationScripts.
Fetch the element with get_form_elements first if you do not already have
them.
If no element in the form has the given element_id, nothing is written: a PUT
of the unchanged list would report success while changing nothing. For the
same reason changes may not be empty, and may not carry elementId —
changing an element's own id does not move the edit to another element, it
asks the API to replace this one with a different element.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changes | Yes | The fields to set on that element, as a partial element object. Must not be empty and must not contain elementId. Field types, enums and ranges are checked against the vendored ElementDTO schema before anything is read or written; a field the schema does not declare is passed through to the API, which has the final say. | |
| form_id | Yes | The form's numeric ID. | |
| element_id | Yes | The elementId of the element to change. It must already exist in the form; this tool cannot create one. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |