Skip to content

simple_form ​

A form. Type is simple_form. Field layout is a DevExtreme dxForm config. Lowercase keys include items, colCount, and labelLocation.

Minimal example ​

javascript
{
  Type: "simple_form",
  Id: "orderForm",
  Option: {
    Component: {
      AutoLoad: true,
      ReadOnly: false
    },
    Toolbar: {
      visible: true,
      Items: { Reload: true, Save: true, New: true }
    },
    Form: {
      LoadSql: { sql_id: 210 },
      SaveSql: { sql_id: 211 },
      items: [
        { dataField: "code", label: { text: "Order no." }, IsUser: false },
        { dataField: "buyer_id", label: { text: "Buyer" }, IsUser: true }
      ]
    }
  }
}

Toolbar.visible and Toolbar.items are native dxToolbar keys. Turning buttons on by name is still Items. Custom buttons are MoreItems. The engine merges both into items.

Buttons that belong to a grid do nothing on a form: AddRow, AddRowsBatch, CloneRows, ReplaceRow, DeleteRow, MoveUp, MoveDown, ExpandAll, CollapseAll, Import, Export, WrapText, ToggleFilterRow, ResetLayout, and the DevExtreme items groupPanel, searchPanel, columnChooserButton.

Platform keys on Form ​

KeyMeaning
LoadSqlLoad the form data
SaveSqlSave the form
AfterSaveAfter save. It can hold FormSql, GridSql, and Js
ForceDesktopKeep the desktop layout. Do not change the column count with the screen width
OnRefreshFunction called after a refresh. Page JSON is parsed with eval, so write a function here
DependentFieldsDependencies between fields. Write this when changing A must recompute B

IsUser: true on a form item means the field stores a user id. The field-permission page uses it to build a “is the current user” condition.

AutoLoad, ReadOnly, DataPool, Init, and Auth on Component mean the same as on data_grid.

This describes the platform. One customer’s business tables are not in these docs.