Download

Form Block

A block for displaying and editing system object data.

The form is generated automatically based on the Object Schema. The Page Schema only defines the layout structure, while field types, validation rules, access control, and display logic are derived from the linked object schema.

If a record identifier is provided in the URL, the API automatically loads the corresponding object data and populates the form for editing.

How It Works

The form block is bound to a system object and an API action.

When the form is submitted, the Frontend automatically calls the specified action and sends the input data in a standard API request format.

Example:


{
    "object": "users",
    "action": "update",
    "data": {
        "id": 15,
        "first_name": "John",
        "last_name": "Smith"
    }
}

Form Structure

The form consists of the following levels:

  1. Areas — page layout sections
  2. Block — logical grouping of fields within an area
  3. Field — form field defined in the Object Schema

Fields within a block are arranged left-to-right and top-to-bottom.

Field width is defined by the size parameter specified in the object schema.

On mobile devices, all areas automatically expand to full width.

Block Settings

Property Type Description
object * string Linked object
action * string Action executed on form submission
areas * array Form layout structure

areas

Areas define the overall page layout and block distribution.

Property Type Description
size * integer Area width from 1 to 3
blocks * array Blocks within the area

blocks

A block groups related fields into a logical unit.

For example:

  • Basic information
  • Contact details
  • Access settings
  • Shipping address
Property Type Description
title * string Block title
fields * array List of object fields

Field definitions are taken from the Object Schema.

Components

The form block supports additional UI components.

buttons

A set of form action buttons.

Examples:

  • Save
  • Create
  • Cancel
  • Delete

The actual set of buttons is determined by page configuration and user permissions.

Example Schema


{
    "title": "",
    "type": "form",
    "size": 4,
    "settings": {
        "object": "users",
        "action": "update",
        "areas": [
            {
                "size": 2,
                "blocks": [
                    {
                        "title": "Basic",
                        "fields": [
                            "avatar",
                            "first_name",
                            "last_name",
                            "patronymic"
                        ]
                    }
                ]
            },
            {
                "size": 2,
                "blocks": [
                    {
                        "title": "Permissions",
                        "fields": [
                            "role_id",
                            "email",
                            "password"
                        ]
                    }
                ]
            }
        ]
    }
}