Creating Forms
You can create multi-field forms with the Forms application. Only authenticated users with the requisite Process Automation Permissions can create forms. At minimum, they should have permission to access the Site Administration menu and the Forms application.) To learn more about DXP Roles and Permissions, see Roles and Permissions.
Building a Form
The sample below is a hotel guest feedback survey form.
-
Open the Product Menu () then click the compass icon () on the Site Administration menu. Select the site where the form will be created.
-
Click Content & Data → Forms.
-
Click the Add button (). The form builder view appears.
-
Enter a name for the form: Guest Feedback Survey.
-
Enter a short description.
-
Enter a page name. Otherwise it will use the default value: Untitled Page (1 of X).
-
Click the Add button () to display the Add Elements sidebar (if it is not already opened).
-
Drag a Select from List field onto the form builder.
-
Enter the following values:
- Label: Rate your visit to the hotel.
- Help Text: Leave this blank for now. If you want a subheading for your field to provide additional guidance, this would be useful.
- Switch the Toggle to YES in the Required Field selector.
- Leave the manual option checked for creating-forms the list of selections. To learn about populating the field with a data provider, see Data Providers.
-
In the Options section, enter the values for the survey question:
- Excellent
- Good
- Neutral
- Bad
noteTyping in one of the fields automatically adds another blank selection line. Just leave the last one blank when you’re done.
-
To add additional elements such as a text field, drag and drop the Text Field element underneath the Select from List element.
-
In the Text Field’s Basic tab, enter the following:
- Label: Comments
- Help Text: Leave this blank.
- Field Type: Click the Multiple Lines radio button to allow longer comments.
- Required Field: Leave the toggle to NO.
-
Close the sidebar.
-
Click Save Form to save the form as a draft.
Adding Form Pages
If you decide multiple pages are appropriate for your form, Liferay Forms supports multi-page forms.
To add Form Pages,
-
Navigate to the form builder view.
-
Click the New Page button at the bottom of the first Form Page.
-
New Form Pages are appended to the bottom of the Form Builder (but before the Success Page).
-
Enter a page name.
-
Drag and drop additional elements.
-
Add even more pages if necessary.
In Liferay 7.3, you can reorder existing form pages. In the form builder, click the up or down arrows in the right corner of the page.
Adding a Success Page
The Success Page provides resolution for Form submitters by letting them know they have reached the end of form and that the form has been successfully submitted.
The default Success Page is handy:
If you don’t want a Success Page, click the Actions () button on the default success page and choose Remove Success Page.
To customize the Success Page,
- Click the Title field (Thank You by default) and use the editor box.
- Click the Message field (Your information was… by default) and use the editor to customize the success message.
Publishing a Form
Once you have completed your form, click the Publish button to make it publicly available for your target audience.
When you publish a form, a URL is generated that can be sent to users to fill out the form.
See Sharing Forms to learn more.
Duplicating a Form
Forms can be duplicated in order to create similar forms without having to create one from scratch. To duplicate a form follow these steps:
-
Navigate to Site Administration → Content & Data → Forms.
-
Click the Actions button () next to the original form.
-
Click Duplicate.
This generates a copy of the original survey form. Users can begin modifying the duplicate form.