Skip to content

Latest commit

 

History

History
234 lines (135 loc) · 3.9 KB

Forms_Which_One_Should_I_Choose_d1d8eb0.md

File metadata and controls

234 lines (135 loc) · 3.9 KB
loio
d1d8eb099d714566becf0af75697d073

Forms: Which One Should I Choose?

To display and edit data in a form, OpenUI5 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

Form (sap.ui.layout.form.Form)

Simple Form (sap.ui.layout.form.SimpleForm)

Flexibility

1

3

Simplicity

3

1

Performance

1

3

Automatic responsive design

Yes

Yes

Accessible design

Yes

Yes

Controls inside are OData-bindable

Yes

Yes

Granular structure of a form control

Yes

No

Legend:

  • Rating:

    • 1: Best suited

    • 2: Average

    • 3: Least suited

  • Yes: Feature is supported for this form type

  • No: Feature is not supported for this form type



Form

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


Simple Form

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



Do not nest layouts and forms

Nesting can lead to undesired issues.


Do not use other forms or layout controls

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 different form controls for different application requirements

Use the Form for performance-critical applications and also to have the most flexible design. Use the SimpleForm if you want the least complexity.