Documentation

Form Field Types

Form Field Types

A form without fields is no form at all. To meet your form-building needs, Liferay Forms provides useful and highly configurable field types. To see examples of the form fields described here, visit the Collecting Information from Users section of the User Guide.

Figure 1: Out of the box form field types.

Figure 1: Out of the box form field types.

Form Text
This is static text on the form. Users do not enter data into Form Text fields. The form creator enters text that form users see displayed on the form. This is useful for longer instructions.

Figure 2: A form text field.

Figure 2: A form text field.

Text Field
Users enter text into these fields. For example, a Full Name field is a text field. By default, a text field keeps all input on a single line of text. To accommodate longer responses, choose the multi-line setting when configuring the text field as in this example. Place limits on the text users can enter (numbers from 1-10, or email addresses, for example) by using the Text field’s validation options (as in this example).

Figure 3: A multiline text form.

Figure 3: A multiline text form.

Select from List
Users select one (or more, if configured to allow it) options from a list of choices. Choices are entered manually or automatically populated by a data provider. For example, a Country of Residence field can be a select from list field populated by a Countries of the World data provider.

Figure 4: A select from list field.

Figure 4: A select from list field.

Single Selection
Using a radio button, users select one option from a list of options displayed on the form.

Figure 5: A single selection field.

Figure 5: A single selection field.

Date
Users select a date using a date picker. For example, a Birth Date field uses the Date field type.

Figure 6: A date field.

Figure 6: A date field.

Multiple Selection/Single Checkbox
Users select one or more options from check boxes (or switchers, if configured). The Single Checkbox field is only available to Digital Enterprise subscribers, but its functionality can be obtained with the Multiple Selection field. The Single Checkbox field will be removed in the next version of Liferay DXP Digital Enterprise.

Figure 7: A multiple selection field using a switcher.

Figure 7: A multiple selection field using a switcher.

« Building Clustering for Liferay PortalKnowledge Base Configuration »
Was this article helpful?
0 out of 0 found this helpful