> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onlyform.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Block properties

> Common block fields, choices, matrix axes, nesting, and every accepted property key.

## Common block shape

| Field            | Type      | Required | Description                                                                      |
| ---------------- | --------- | -------- | -------------------------------------------------------------------------------- |
| `id`             | string    | Yes      | Stable ID, unique across the complete nested block tree. Maximum 200 characters. |
| `type`           | string    | Yes      | One value from the block type registry.                                          |
| `label`          | string    | Yes      | Question or screen title.                                                        |
| `description`    | string    | Yes      | Supporting or content text.                                                      |
| `required`       | boolean   | Yes      | Whether an answer is required.                                                   |
| `properties`     | object    | Yes      | Type-specific settings.                                                          |
| `choices`        | Choice\[] | No       | Choice-based blocks.                                                             |
| `matrix_columns` | Choice\[] | No       | Matrix column definitions.                                                       |
| `matrix_rows`    | Choice\[] | No       | Matrix row definitions.                                                          |
| `children`       | Block\[]  | No       | Nested blocks in a `group`. Maximum nesting depth is 20.                         |
| `part_of`        | string    | No       | ID of the related field or logic source.                                         |
| `row_id`         | string    | No       | Groups adjacent compact fields into one row on `SINGLE` forms.                   |

## Choice shape

| Field    | Type   | Required | Description                                          |
| -------- | ------ | -------- | ---------------------------------------------------- |
| `id`     | string | Yes      | Stable ID, unique inside that choice collection.     |
| `label`  | string | Yes      | Respondent-facing value.                             |
| `image`  | object | No       | Picture-choice image data, normally including `url`. |
| `color`  | string | No       | CSS color associated with the choice.                |
| `row_id` | string | No       | Optional choice row grouping ID.                     |
| `alt`    | string | No       | Alternative text for a picture choice.               |

## Property catalog

| Property                                                   | Type                                    | Used by                                   |
| ---------------------------------------------------------- | --------------------------------------- | ----------------------------------------- |
| `buttonText`, `buttonLink`, `shareButtons`                 | string, URL, boolean                    | Welcome and ending                        |
| `maxChars`, `placeholderText`                              | integer, string                         | Text, email, URL, phone, signature        |
| `min`, `max`, `minVal`, `maxVal`                           | number, number, boolean, boolean        | Number, currency, slider, rating          |
| `numberFormat`, `currency`, `amount`, `paymentGateway`     | string                                  | Number, currency, payment                 |
| `from`, `to`, `scaleStep`                                  | number                                  | Opinion scale and slider                  |
| `firstLabel`, `secondLabel`, `thirdLabel`                  | string                                  | Opinion scale and slider                  |
| `leftLabel`, `centerLabel`, `rightLabel`                   | boolean                                 | Opinion scale labels                      |
| `icon`                                                     | `star` or `heart`                       | Rating                                    |
| `dateFormat`                                               | `DDMMYYYY`, `MMDDYYYY`, or `YYYYMMDD`   | Date                                      |
| `dateSeparator`                                            | string                                  | Date                                      |
| `disabledDays`                                             | integer 1-9                             | Date                                      |
| `beforeDate`, `afterDate`, `specificDates`                 | date-time, date-time, date-time\[]      | Date                                      |
| `weekStartsOn`                                             | integer 1-7                             | Date                                      |
| `showFields`, `showDatePicker`                             | boolean                                 | Date                                      |
| `showSeconds`, `showTimePicker`                            | boolean                                 | Time                                      |
| `multiSelection`, `randomize`, `alphaOrder`                | boolean                                 | Choice collections and matrix             |
| `otherOption`, `otherText`                                 | boolean, string                         | Multiple choice, picture choice, dropdown |
| `horizontalAlign`, `verticalAlign`, `perRow`               | boolean, boolean, integer               | Choice layout                             |
| `showLabels`, `superSize`, `badgeType`, `colorOption`      | boolean, boolean, enum, boolean         | Choice presentation                       |
| `defaultCountry`                                           | ISO country code                        | Phone number                              |
| `addressOrContact`                                         | object                                  | Address and contact info                  |
| `legalText`, `legalType`, `legalStopFurther`               | string, 1 or 2, boolean                 | Legal                                     |
| `limit`, `allowedFiles`, `multipleFiles`, `maxFileSize`    | integer, string\[], boolean, boolean    | File upload (Pro)                         |
| `captchaType`                                              | `turnstile`, `reCaptcha`, or `hCaptcha` | Captcha                                   |
| `videoLink`, `pdfLink`, `embedLink`                        | URL                                     | Video, PDF, audio                         |
| `image`, `imageAlign`, `altText`, `imageAlt`, `imageWidth` | object, enum, boolean, string, number   | Image-capable blocks                      |
| `quotationMarks`                                           | boolean                                 | Statement                                 |
| `rule`, `showActions`                                      | object, boolean                         | Logic                                     |
| `hide`                                                     | boolean                                 | Hidden field                              |

Unknown property keys are retained for forward compatibility, but only documented combinations are guaranteed to affect rendering.

## Matrix example

```json theme={null}
{
  "id": "satisfaction",
  "type": "matrix",
  "label": "Rate each area",
  "description": "",
  "required": true,
  "matrix_columns": [
    { "id": "poor", "label": "Poor" },
    { "id": "good", "label": "Good" },
    { "id": "great", "label": "Great" }
  ],
  "matrix_rows": [
    { "id": "support", "label": "Support" },
    { "id": "product", "label": "Product" }
  ],
  "properties": { "multiSelection": false }
}
```
