表单字段
表单的输入控件
面向表单作者:表单可以包含的字段类型,以及每种类型支持的属性。
表单字段定义了表单的输入控件。每种字段类型都有自己的属性和行为,用于收集某一类数据。
根据要收集的数据选择合适的字段类型,从纯文本到结构化列表都有。
通用属性
所有表单字段都有两个基本属性:
- name (string,必填):字段的唯一标识符
- type (string,必填):字段类型,决定了下面哪个页面描述其可用属性
每种字段类型还会增加与其功能相关的属性。在导航侧栏或下表中选择一种字段类型,即可打开其完整的属性参考:
| 字段类型 | 描述 |
|---|---|
| text | A text input field |
| textarea | A textarea input field |
| datetime | A datetime input field |
| html | An HTML field. The html is sanitized before it is rendered: |
| file | A file upload field, the file is uploaded prior to the job start and the extravars will contain the uploaded file info. |
| number | A number input field |
| password | A password masked input field |
| checkbox | A checkbox field |
| radio | A radio field (multi options) |
| enum | A multi-column filterable dropdown box |
| expression | A powerfull javascript driven expression field |
| list | A list of structured rows edited through a reusable subform (replaces the |
| yaml | A YAML editor field with syntax highlighting and validation |