Skip to content

Update Form Field

PUT/form-fields/:id

Update an existing form field. Only the attributes you include are changed.

Attributes

AttributeTypeDescription
titlestringHuman-readable field label.
descriptionstring
fieldenumtext, textarea, radio, checkbox, select, country, rating, section, company, title. The input type of the field.
ordernumber
settingsobject
formIdnumberForm this field belongs to.
sectionIdnumber
statusenumcreated, locked

All attributes are optional.

Request

js
import Confetti from 'confetti'

const confetti = new Confetti({ apiKey: 'your-key' })

const formField = await confetti.formFields.update(1, {
  title: 'example',
})
sh
curl -X PUT "https://api.confetti.events/form-fields/1" \
  -H "Content-Type: application/json" \
  -H "Authorization: apikey your-key" \
  -d '{
  "data": {
    "type": "formField",
    "id": "1",
    "attributes": {
      "title": "example"
    }
  }
}'