nestedform - 渲染一个嵌套表单,使用相关记录或 可 JSON 属性。字段可以内联定义,也可以使用外部 YAML 文件定义。
content:
type: nestedform
showPanel: false
form:
fields:
added_at:
label: Date Added
type: datepicker
details:
label: Details
type: textarea
title:
label: This the title
type: text以下 字段属性 受支持且常用。
| Property | Description |
|---|---|
| label | a name when displaying the form field to the user. |
| comment | places a descriptive comment below the field. |
| form | inline field definitions or a reference to form field definition file. |
| showPanel | places the form inside a panel container. Default: true |
| defaultCreate | if a related record is not found, attempt to create one. Default: false |
将一个字符串传递给 form 属性,以引用一个外部的 YAML 文件。
profile:
label: Profile
type: nestedform
form: $/october/demo/models/profile/fields.yaml与其他任何表单一样,嵌套表单小部件通过将字段放置在 form 定义的 tabs 或 secondaryTabs 属性下,来支持使用选项卡。
tabbed_content:
type: nestedform
form:
tabs:
fields:
# ...