A custom composite field lets you group related fields (like First Name, Last Name and Email) into a single reusable unit (like Contact Details). When added to a form, all the grouped fields will appear together.
When you should use custom composite fields
- When you need to collect a repeatable set of information in a consistent way, such as contact details for multiple people.
- When you want to allow respondents to add multiple entries with the same questions (e.g. Add another person).
- The fields relate to each other and make sense when grouped together.
When you should avoid using custom composite fields
- When the fields are only needed once and don't need to be repeated.
- If the individual fields within the group require different visibility or validation rules - add the fields individually instead.
Guidelines
Do:
- Name each field within the group clearly so it's clear what information is being collected
- Ensure the CTA to accept multiple entries is well labelled and clear (e.g. Add another person)
Don't:
- Add too many fields to the group as it may be confusing and clutter the form
- Use if the group of fields don't need to be reused or repeated
Adding a custom composite field
- Navigate to Structure > Webforms > Forms and locate your webform by typing its name into the search.
- Open your webform and navigate to Build > + Add element.
- In the Select an element popup, select the Custom composite element.
- Complete the form:
-
Element settings:
- Title: The bolded label / question of the grouped fields
- Allowed number of values: The number of times someone can respond to the group of questions
-
Custom composite settings:
- Key: A unique identifier for the field
- Select type: The type of field and how the information will be collected, such as a dropdown or text field
- Enter custom properties: Specific values that will be accepted in that field.
- Required: Whether or not the field needs to be populated
- Title: The bolded label / question of the individual field
- Description: The helper text that is shown below the label / question of the individual field
- Element description/help/more: The helper text that is shown underneath the grouped fields title
-
Element settings:
Need any more help?
If you have any questions, or require assistance with anything mentioned in this article, submit a request via the webform.