Skip to content

Form

A Form represents a data collection schema. It holds a name, an auto-generated slug, and an array of Field definitions that describe what data to collect and how to validate it. Forms are the top-level resource in the Forms module and serve as the parent for fields and entries.

Sample Object

{
  "id": "frm_abc123def456",
  "name": "customer_feedback",
  "slug": "customer_feedback",
  "fields": [
    {
      "id": "fld_abc123def457",
      "form_id": "frm_abc123def456",
      "name": "rating",
      "data_type": "int",
      "options": [1, 2, 3, 4, 5],
      "required": true,
      "depends_field": "",
      "depends_field_value": ""
    },
    {
      "id": "fld_abc123def458",
      "form_id": "frm_abc123def456",
      "name": "comment",
      "data_type": "text",
      "options": null,
      "required": false,
      "depends_field": "",
      "depends_field_value": ""
    }
  ]
}

Fields

FieldTypeDescription
idstringUnique identifier for the form. Auto-generated on creation.
namestringHuman-readable name for the form. Required.
slugstringURL-friendly identifier derived from the name. Auto-generated.
fieldsarrayArray of Field objects defining the form schema. Each field specifies name, data type, validation rules, and optional conditional logic.

Actions

Creating a form

Create a new form with an optional set of inline field definitions. Fields can be added later using the field sub-resource endpoints.

obx app forms init

Edit the generated file to add the form name and fields, then run:

obx app forms push init

Getting a form by ID

Retrieve a single form including its full field definitions.

obx app forms get frm_abc123def456

Listing all forms

Retrieve all forms in the project.

obx app forms list

Updating a form

Update the form name and replace its field definitions. Provide the full set of fields in the request. Fields not included are removed from the schema.

obx app forms push frm_abc123def456

Deleting a form

Delete a form permanently. This removes the form schema and all associated entries.

obx app forms delete frm_abc123def456