Our documentation has been relocated here, the Liferay Developer Network. Please update your bookmarks!

Users sometimes must give you information so you can help them. Whether you’re asking them to submit a brief survey or apply for a mortgage, you must design a form. Liferay Forms gives you almost limitless form building capability. For a complete list of the form fields available, visit the form fields reference article.

Because the complexity of use cases for Forms varies from a single input field to many pages of fields with different configurations, it makes sense to show you how to build and publish simple forms very quickly, and then show you all the additional features you can use for more complex use cases. Here’s a sampling of the what the Forms application can do:

  • Populate a Select or Radio field with a REST Data Provider
  • Make a field appear based on the value of another field
  • Add extra pages to the form
  • Enable CAPTCHA for a form
  • Store results in JSON
  • Enable workflow for the form
  • Redirect to a different URL after a successful form submission
  • Send an email notification to administrators whenever a form is submitted
  • Provide a default value (entered if left alone by the user) or a placeholder value (not entered if left alone by user) for each field
  • Validate fields using a number of different criteria
  • Redirect users to a success page after form submission
  • Define Form Rules to create dynamic form behavior (for example, show or hide a field based on input in another field).
  • Translate form text into any supported language.
  • Create partial forms (with fields and other elements and specific configurations) and save them for reuse.
  • Drag and drop fields onto the form layout.
  • Duplicate a form instead of starting a similar form from scratch.

Despite this long list of more complex options, developing a simple, elegant form to suit basic needs takes little effort. The next article covers basic form building.

Forms and Lists

When you need a form, what you’re really looking for is data. There are two applications for building forms to collect precisely the data you need:

  1. Liferay Forms: The primary form building application is for the simplest one or two question survey to the most complex, multi-page, homeowners insurance application containing rules and lists populated by a REST data provider.

  2. Dynamic Data Lists (DDL): Provides a user interface tool for building reusable form- and list-based applications intended for display on pages, using templates.

Which Form Builder Should I Use?

Liferay Forms (also referred to as Forms) is a relatively new application, first appearing in Liferay Portal version 7.0. If you can use Liferay Forms for your use case, you should.

So the question “Which form builder should I use?” can be restated to “When should I use Dynamic Data Lists?”

  • Use Dynamic Data Lists (DDL) if you need a way for users to enter data, and you need to display the data in the user interface.

  • Use DDL if you need to style your lists and forms with templates.

  • Use DDL if there’s a field type you need that’s not included (yet) in Liferay Forms. These are the field types included in DDL that are not in Liferay Forms at the time of this writing: - Geolocation - Web Content - Link to Page

It’s important to note that these (and more!) form field types will be included in future versions of the Liferay Forms application.

When all form building features are fully merged into Liferay Forms, the best features of DDL, all the new features of Liferay Forms, and all future improvements will be in one application. Now is the time to familiarize yourself with Liferay Forms and begin using it for all your form building needs, except for the narrow use cases described above.

What’s New with Liferay Forms

Liferay Forms is evolving. This article compiles the prominent changes and additions to Forms. More details on these features are found in the other articles of this section. Form Rules Set dynamic...

Leer más

Creating and Managing Forms

The Forms widget can do a lot of things really well, but if you just need a simple form, how do you wade through all the features you don’t need? Is your simple survey going to make you late for...

Leer más

Managing Form Entries

Once users begin submitting form entries, you’ll want to do these things with them: View form entries Export form entries Delete form entries Start by learning how to access and view the entries....

Leer más

Form Element Sets

If you’re here looking for information on reusable field sets, you’re in the right place. We call them Element Sets in the Liferay Forms application because these sets include more than just...

Leer más

Data Providers

Select from List fields can hold a lot of options. There are around 200 countries on Earth, for example. If you have unoccupied unpaid interns you could ask them to type each country into the...

Leer más

Auto-Save

Losing progress on a partially created form is bad. Make sure to save your work frequently as you’re creating forms. But if you forget to save your work, Liferay Forms has your back. By default, a...

Leer más

Translating Forms

Forms can be translated to any locale that Liferay Portal supports. The form builder specifies a translation of the form’s default language. Figure 1: A form is translate-able into any supported...

Leer más

Autocompleting Text Fields

It’s been scientifically proven that Internet users are lazy (not you, of course—other Internet users). For example, some users may not fill out your form if you make them type the entire title of...

Leer más

Form Success Pages

After users submit one of your whiz-bang forms, what’s next? How will they know they’re done and can close the browser window or tab? What if they think their submission didn’t go through and...

Leer más

Workflow and Forms

Kaleo is a workflow engine for sending a submitted asset through a workflow process before it’s published. Most assets are configured to use workflow at the instance or Site level. Figure 1:...

Leer más

Duplicating Forms and Form Fields

Duplicating effort wastes time and increases the likelihood that something won’t be perfectly replicated. Instead of duplicating effort, duplicate forms and form fields. To duplicate a form, Go to...

Leer más

Form Pages

Are users more likely to abandon long forms with lots of scrolling? Are they more likely to see a multi-page form and abandon it without a second look, assuming that it gets longer and more tedious...

Leer más

Help Text, Placeholder Text, and Predefined Values

Form fields can have help text, placeholder text, and predefined values. Help Text: Text that appears as a sub-heading to the field label, but doesn’t appear in the field entry area. Enter help...

Leer más

Validating Text and Numeric Fields

Validation ensures that only certain values are entered in a field. Validation functionality is available for text and numeric fields. To enable validation, Add a Text or Numeric field to a form in...

Leer más

Enabling CAPTCHA on Form Submissions

CAPTCHA prevents a bot from submitting forms. It’s often used in login apps, but you can also use it in the Forms app. To enable CAPTCHA, click the form’s Options button () and select Settings....

Leer más

Form Notifications

You can configure the Forms app to send a notification email each time a form entry is submitted. Open the form’s Form Settings section by clicking the Options button () and selecting Settings....

Leer más

Redirecting Users

When users submit a form, you can present them with another page indicating success or some other information related to their submission. Sometimes all you need is a success page, but other times...

Leer más

Form Permissions

To access a form’s permissions, first navigate to the Forms app in Site Administration (your site’s menu) → Content → Forms. Then click the form’s Actions button (), and select Permissions. By...

Leer más

Styling Form Pages

Let’s face it: nobody likes an ugly, confusing form. Styling your form pages lets you make your forms user friendly. There are two features for styling your forms: Create rows and columns for form...

Leer más

Form Rules

What’s the difference between a chicken and a dog? Among other things, you can’t train a chicken, while dogs are quite trainable. If you’re skeptical, try teaching your chicken to sit on command or...

Leer más

Dynamic Data Lists

Dynamic data lists display forms created from field sets called data definitions. Data definitions consist of a form’s field types (e.g., text, boolean, date, radio buttons, selector menus, etc.)...

Leer más
0 (0 Votos)
Configuring Search Anterior