Appway is often used to gather customer data with the help of forms. As a solution developer, you need to understand how to build a basic form layout, and how Appway’s Adaptive Flow Layout (AFL) can support you in doing so.
The form you design must guide users through the data gathering process. Once this precondition is met, you can focus on keeping the form as short as possible. Let's take a look at how you can design and implement a user-friendly form.
Users follow a vertical pattern while gathering data, meaning they instinctively expect the next form field to be placed directly below the one on which they are currently focusing. Placing form fields in horizontal rows can break users' natural flow and rhythm.
When form fields are organized in one vertical column, users need less time to fill in a form.
You can control the amount of form elements which should be placed on one row with the setting Max Elements Per Row of the Adaptive Flow Layout Component.
This setting should be set to '1' so that all Adaptive Flow Layout Groups and Elements appear below each other.

As outlined above, a one-column form layout usually performs better. However, there is an important exception to this rule: users accept more than one column when short and/or logically related form fields are presented on the same row.
Two examples where this rule could be applied:
- 'First name' and 'Last name' form fields on the same row
- 'Zip code' and 'City' form fields on the same row
One advantage of this approach is to save space and make the form a bit shorter without impairing usability.
The previously mentioned Max Elements Per Row setting of the Adaptive Flow Layout can be used to place more than one form element on one row.
To place the form fields First name and Last name next to each other on one row, specify a value of ‘2’ in the Adaptive Flow Layout Group enclosing the Adaptive Flow Layout Elements.

You can now place the Adaptive Flow Layout Elements for 'First name' and 'Last name' within the Adaptive Flow Layout Group which allows more than one element per row.

To further improve usability of your form, labels should be placed on top of form fields.

There are two major advantages to placing labels above the fields:
- Top-aligning labels helps users scan a form faster
- Top-aligning labels makes it easier for labels of varying length, and localized/internationalized labels, to fit within the form
Use the Adaptive Flow Layout's Top Label Cutoff setting to place a label on top of the form field. If a form field is smaller than the specified value, the label gets placed on top of that field.
Setting the value to '9999' makes sure that labels always appear on top of form fields.
Note: The value '9999' is a commonly used value in front-end development to force certain behavior in the browser. It refers to pixels, and not to any values contained within the fields.

In order to have this set as default for every form in your Solution, configure the Adaptive Flow Layout settings in the ComponentExtension settings: Studio > System Configuration > Extensions > Right-click on ComponentExtension > Edit Configuration.

You also have the option to configure this behavior for specific forms only. In this case, add the Top Label Cutoff value to an Adaptive Flow Layout Group in your form.
Important: The setting on the form itself overrides the ComponentExtension settings mentioned above.

Filling in forms is often a mental burden to users: they have to deal with a lot of data. Shorter forms are better than longer forms. When forms are long, users may find it difficult to maintain concentration while filling in a lot of data. Removing fields is one way to shorten a form:
Nielsen Normal Group suggests removing fields which collect information that can be:
- Derived in some other way
- Do you really need to ask the customer for this information, or can it be obtained in another way?
- Collected more conveniently at a later date
- Does this information need to be collected now with the other items in the form?
- Simply omitted
- Do you actually need this information?
Removing fields when building a form might be difficult and time-consuming. However, you can benefit from an increase in process efficiency, and your users can benefit from reduced effort.
Another option to reduce the mental burden for users when filling out a form is to split the form into two or more sections. Longer forms usually require user data on multiple different topics. Let’s take a form to gather personal data as an example: Your personal details—such as name, date of birth and nationality—don’t need to be provided within the same section as details on your educational background or your financial situation.
When building a Solution based on the Appway Design System, a form can be split into separate sections with the help of a sequence of Activity Screens, or the Master Detail pattern. The Anchor Bar navigation element can also be used to provide better guidance on longer forms.
The most direct approach to split a form is to group form fields in meaningful sections:

Grouping related form fields can be achieved with the help of the Adaptive Flow Layout Group Component. You can also add a Group Title.
Group titles should be semantic, and provide context for users: use the titles Work Address and Home Address instead of Address 1 and Address 2, for example.

Important! Before shortening the form or splitting it into sections, make sure that such changes do not negatively impact usability. A shortened or grouped form which confuses users is far worse than a longer form with a clear guidance!
I've provided the basics of designing forms in this article, and how to create these forms using the various properties of the Adaptive Flow Layout. These guidelines should cover most design cases.
However: A form should always support the specific use case it is built for.
In certain cases, adaptations and enhancements of the basic form layout can make sense. But make sure that when creating forms, you're always thinking about the user flow and the purpose of a specific form. Whatever changes you wish to make, always follow the fundamental principle: Strive for an infallible form flow.
The DesignSystemExamples Package provided with the Design System includes an example Screen with the basic form layout described above: Form_Standard-example
You may also be interested in our content on Data Entry Patterns, and our article on Working with the Adaptive Flow Layout.