Add form field

Add a field to a form in the Form Editor.

POST https://cotlet.dev/api/v1/123formbuilder/forms/{form_id}/field

write Confirm

Adds one field by the name it has in the Fields panel (Essentials, Contact details, Date & Time and the other groups). With after_field it is placed below that field, like a field added while another is selected; without it, at the end. A form embedded with the JavaScript code shows the new field as soon as it is saved. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: add_form_field
NameTypeDescription
form_id integer required integer Form id from list_forms.
field_type string required string Field type as named in the Fields panel, e.g. Email.
label string required string Label shown above the field.
after_field string string Label of the field it goes below.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/123formbuilder/forms/5130021/field \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"field_type":"Email","label":"Work email","after_field":"Email"}'
Python
result = client.call("123formbuilder", "add_form_field", {"form_id":5130021,"field_type":"Email","label":"Work email","after_field":"Email"})
Node.js
const result = await cotlet.call('123formbuilder', 'add_form_field', {"form_id":5130021,"field_type":"Email","label":"Work email","after_field":"Email"});
CLI
cotlet call 123formbuilder add_form_field --data '{"form_id":5130021,"field_type":"Email","label":"Work email","after_field":"Email"}'

Example response

JSON

{
  "form_id": 5130021,
  "field": {
    "label": "Work email",
    "type": "Email",
    "required": false
  },
  "position": 3
}

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.