Type: Feature Request
Resolution: Implemented in Platform
Affects Version/s: 7.1.10 DXP FP6, 7.1.X
Fix Version/s: None
Parts of this ticket have been identified by an existing Liferay DXP Customer as making the current forms capabilities “Unusable” – specifically the need to allow a group of fields to be repeated with a single click.
Most electronic forms incorporate groups of fields that have a relationship to one another, such as the various fields that make up an Address, those that describe an individual (Name, Title, Date of Birth) etc. Many others have groups of fields that need to be treated as a group - i.e. have rules to show/hide them, allow the group to be repeated etc.
In Forms we allow individual fields to be repeatable, but unlike DDLs there is no way for fields to be grouped (in DDLs new fields can be dragged over an existing field to create a group - if the parent is repeatable all fields are repeatable).
This provides a very poor end-user (i.e. Form Submitter) experience if the Form Designer wants to create a set of fields that need to be repeatable. Each field must be repeated one by one. An example might be a School Enrolment form where the details of each Sibling (Name, DoB, Gender, Do they attend the same school?) need to be added. This should be able to be done with one click, however currently the Form Submitter must click the “+” button on each field in turn.
Further to this, the Rules Builder allows rules to be created based on prior user choices. These rules will typically apply to more than one field - i.e. a group. For example on the above School Enrolment it is typical to provide a page for the details of the First Parent/Guardian to be added, and a second for the Second Parent/Guardian - but to make these optional based on whether the child has 2, 1 or no Parents. Building a rule that adds each field in turn is time consuming when there might be 20 or more fields.
Forms provides "Element Sets" which at first glance could help in this area - however Element Sets currently only benefit the Form Designer - and even then once an Element Set is dropped onto a form any grouping is lost - each field becomes entirely independent.
Extend the capabilities of “Element Sets” such that they can benefit both Forms Designers and Forms Submitters as follows:
For Forms Designers
- Add a new “Properties” tab for Element Sets (we already have this capability for Fields)
- Add a “Group Fields” slider. Most likely default this to On.
- Add a “Repeatable” slider to enable the group to be repeated (only available if “Group Fields” is on)
- Add a “Label” option so that the group can be identified as a group (similar to “liferay-ui:panel” JSP tag) – could also support being collapsible, have a border styling etc.
- A Grouped Element Set should support the creation of Rules that act on all fields in the group through the definition of a single rule. e. Once the Grouped Element Set is added to the form design the name of the Element Set should be available in the list of fields for creating new rules.
- A Grouped Element Set should be able to be moved on the form as a single entity, just as individual fields are.
- It should be possible to Ungroup an Grouped Element Set once it is deployed to a form design (e.g. similar to PowerPoint)
- It should be possible to Group (or Regroup) fields on the form design and (effectively) create a dynamic Element Set with all of the capabilities described in 1-3 above (e.g. using UX similar to that of PowerPoint)
For Forms Submitters
- A Form Submitter should be able to repeat a Grouped Element Set with a single click. This should repeat the complete set of fields contained within the Grouped Element Set directly beneath the existing set
- A Form Submitter should be able to remove a repeated Grouped Element Set with a single click