Update a FoxForm form
foxform_update_formUpdate an existing form's fields, including each screen's conditional logic (branching). Requires a WRITE-scoped API key. Only the fields you pass are changed.
Args:
form_id (string): the form to update (required)
title (string, optional)
description (string, optional)
theme (string, optional)
questions (array, optional): replaces the FULL screen list — there is no per-screen patch. To add logic to one screen: call foxform_get_form with response_format 'json', edit that screen's
logic, and send the whole array back.thank_you_message (string, optional)
Returns: { form } with the updated form.
Screen fields are validated: unknown fields are REJECTED instead of being stored and ignored (the API accepts arbitrary keys but no renderer reads them), then.targetScreenId must be the id of a screen in the same payload, and {{variables}} that no screen exposes come back as warnings.
CONDITIONAL LOGIC (branching), per screen — stored in questions[].logic:
logic.conditionalNavigationV2 = { enabled: true, groups: [ // groups are OR-joined; FIRST matching group wins { id: "grp-1", conditions: [ // conditions inside a group are AND-joined { id: "cond-1", left: "{{quer_testar}}", operator: "equal_to", right: "Ainda não" } ], then: { type: "specific_screen", targetScreenId: "s-motivos" } } ] }
then.type: 'next_screen' | 'previous_screen' | 'specific_screen' (needs targetScreenId = another screen'sid) | 'end_form'. Addthen.url(+ optionalopenNewTab) to redirect to an external URL instead.operator: 'equal_to' | 'not_equal_to' | 'greater_than' | 'greater_or_equal_than' | 'less_than' | 'less_or_equal_than' | 'contains'.left/rightare EXPRESSION strings: a literal ("10", "Ainda não"), a variable ("{{score}}", "{{minha_var}}" = the screen'svariableName), or arithmetic ("calc({{peso}}/(({{altura}}/100)*({{altura}}/100)))").Comparing an ANSWER: use
left: "{{<variableName of the deciding screen>}}"andright= the option'slabelOR itsvalue(both match).{{score}}is the running sum ofpointson the options picked so far (choices[].points,images[].points) — that is how score-based branching works.A navigation group with no conditions NEVER matches.
enabled: falsestores the rules but disables them.Screen-level conditional display uses the same group shape:
logic.display = { enabled: true, groups: [...], showAfterSeconds?: n }(thenis ignored — THEN means "show").Other logic keys:
logic.autoAdvance = { enabled, delaySeconds? },logic.navigationBehavior = { onButtonClick?, onAutoAdvance?, targetScreenId? }.logic.conditionalNavigation(legacy, pre-DEVF-161) is still read and migrated on load — don't author new rules with it.
Unknown fields are REJECTED (they used to be stored and silently ignored): logic as an array, or rules/branching/conditions/goto/jump/nextScreen anywhere, are not read by any renderer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| theme | No | ||
| title | No | ||
| form_id | Yes | Form ID | |
| questions | No | Replaces the full screen list. Conditional logic goes in each screen's `logic` (see the tool description). | |
| description | No | ||
| thank_you_message | No |