To display and edit data in a form, SAPUI5 offers various form controls that are suitable for different use cases. This documentation outlines which form controls are available, and what features are supported by each one.
The following table gives an overview of form controls and their usage:
Overview of Form Controls and Supported Features
|
Simple Form ( |
Smart Form ( |
||
|---|---|---|---|
|
Flexibility |
1 |
3 |
2 |
|
Simplicity |
3 |
1 |
2 |
|
Performance |
1 |
3 |
2 |
|
Automatic responsive design |
|||
|
Accessible design |
|||
|
Controls inside are OData-bindable |
|||
|
Granular structure of a form control |
Legend:
-
Rating:
-
1: Best suited
-
2: Average
-
3: Least suited
-
Use sap.ui.layout.form.Form if you want to do the following:
-
Create a highly customized form
-
Display a large amount of data in a form
-
Create complex forms with multiple sections and different types of input fields
-
Have granular control over the structure of a form
-
Manage the responsiveness of the form yourself
Use sap.ui.layout.form.SimpleForm if you want to do the following:
-
Use a very simple structure of a form in a straightforward way
-
Create a form quickly and easily
-
Use a form that is automatically responsive
Use sap.ui.comp.smartform.SmartForm if you want to do the following:
-
Create and edit forms for SAP applications
-
Work with
SmartFieldcontrols inside the form -
Leverage the built-in data validation of SAPUI5 based on the OData model's metadata
-
Work with OData services and automatically generate form fields
Nesting can lead to undesired issues.
Using any other form or layout control (for example, HBox) as children of a form can lead to issues with accessibility or the responsive design. This applies to all form controls mentioned.
Use the Form for performance-critical applications and also to have the most flexible design. Use the SimpleForm if you want the least complexity.

