SAP UI5 Form forms are used to present data to users and allow users to enter data in a structured way.
Forms act as 容器
for other UI elements such as labels, input fields, checkboxes, and sliders, while building these elements into a specific layout.
In SAPUI5, forms can be built using two different controls:
- Form – sap.ui.layout.form.Form
- Simple Form – sap.ui.layout.form.SimpleForm
Using forms, developers can easily lay out property lists and input fields. Forms are constructed as Form Containers. Each form container consists of form elements. Each form element consists of a label (Label) and an input field (Input), paired.
Simple form controls allow developers to achieve the same results as form controls, but in a simpler way. In a simple form, a form control is created along with its form container and form elements:
The layout and structure are defined by what is entered.
Form containers and form elements are automatically created based on the content type.
A title (sap.ui.core.Title) automatically starts a new form group (that is, the form container), and a label (sap.m.Label) automatically starts a new line (that is, the form element).
All other controls following this tag will be assigned to its row (that is, the form element).
There are three types of Form editing methods:
- Display only: The data is displayed only as tag value field pairs, with no editable fields.
example:
- Editable: The data is presented as a pair of label input fields, so the user can enter the data.
example:
- Mixed: Some fields are editable, some are not.
The editable property for forms and simple forms only changes the label height vertically aligned to the field (editable=true) or text (editable=false). With forms and simple forms, it doesn't switch the entire form between editable and read-only mode, changing fields to text and vice versa.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。