Get form logic

Show and hide rules on questions and the branches between pages.

GET https://cotlet.dev/api/v1/fillout/forms/{form_id}/logic

read

Returns the conditions set on each question (hide when, hide always) and the page branches from the Logic view, each with its condition and target page. Read it before changing logic so a new rule does not collide with an old one.

Parameters

Parameters: get_form_logic
NameTypeDescription
form_id string required string Form ID from list_forms.

Request

cURL
curl https://cotlet.dev/api/v1/fillout/forms/form_8c41d2/logic \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("fillout", "get_form_logic", {"form_id":"form_8c41d2"})
Node.js
const result = await cotlet.call('fillout', 'get_form_logic', {"form_id":"form_8c41d2"});
CLI
cotlet call fillout get_form_logic --data '{"form_id":"form_8c41d2"}'

Example response

JSON

{
  "form_id": "rK8mTn4vYb1C",
  "question_rules": [
    {
      "question_id": "q_org_description",
      "hide_always": false,
      "hide_when": [
        {
          "source": "answer",
          "question_id": "q_company_type",
          "operator": "is not",
          "value": "Non-profit"
        }
      ]
    }
  ],
  "page_branches": [
    {
      "from_page": "Info",
      "to_page": "Accepted",
      "condition": {
        "question_id": "q_company_type",
        "operator": "is",
        "value": "Student"
      }
    }
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.