Example - Repeatable Groups

To provide an example use for Repeatable Groups we have a form for registering a team for the local pub quiz. We have a Team Name and Contact email, then a Repeatable Group to enter each member of the team with a First Name and a Last Name.

The form handler pipeline iterates through the groups to combine First Name and Last Name and build them into a comma separated list.

Feel free to submit the form as often as you want. The form is saved to your session, but the data is not saved or logged anywhere else. All it does is validate the inputs and return a success or error message. The session data facilitates persistence of some inputs, so you only need to enter your name and email once. You can also see your most recent form submission presented using Form Reform Display.

Loading...

Your team can have between two and four team members.

How this form works

The blocks used are the same as those used in any form with Form Reform. The difference is that a container is added to provide 3 columns with text inputs for first_name and last_name, then a Repeatable Group block is added to the third column. For the front end of the form, its a simple as that!

The Repeatable Group block automatically detects the row of the 3 column container which contains the form elements and provides Add, Delete and Sort controls to manage replication of the group.

Our pipeline handling the repeatable group

The pipeline shown below is a front-end non-editable version of the pipeline used to handle the above form. You can expand any stages to view the details. As usual, the submitted form is only saved to your session.

The new part of our pipeline is simply adding an extra {{place_holder}} to the Message to provide a cleaner format of our team member names.

The second Condition If section towards the end of our pipeline is to add a display of any UTM tags, as described in Example - Tracking UTM tags. If you are not using Form Reform UTM, you can ignore that part of the pipeline.

Handler pipeline for: Submit


Handlers in the pipeline will be applied in sequence when a form is submitted.

Spam Detect

Configure multiple spam detection strategies. Each spam detection strategy can be separately enabled to either fail silently or to provide an error message that can then be managed through the On Error handlder.
Check for spam using the core Anti-Spam service.
Check using the core Banned Words service. Use this with caution on multilingual sites. A banned word in one language could be perfectly acceptable in another language.
Check using the core IP Deny list. The IP Deny service maintains a dynamic blacklist and whitelist of IP addresses. If an IP address is not in the whitelist it is checked against the blacklist.
Check if the submission contains URLs. URL inputs are exempt from this check.
Check if the submission contains <html> tags. Rich Text inputs are exempt from this check.
Check if the submission contains <script> tags. This should normally be enabled.
Some blocks such as the Honeypot and Captcha also detect spam. Their detection response can be managed by the normal form validation error handling , or by direct integration with this Spam Detect handler.

Validate Input Fields

Validate form input fields. Validate the form input fields provided by each block in the form. Provides a list of errors as {{errors:list}} if validation fails.

On Success

Denotes success processing (no errors). On Error and On Success should always be used in together to denote processing for errors and processing for no errors. Either may be used first.

Save to Session

Save form submission to session data. Data extracted from form fields is saved to the visitor/user session data. This is transient data that lasts for the duration of the Concrete CMS session. The primary reason for saving to a session is to enable values to be recovered and inserted into the same or other forms.
A form can be saved to the name configured by the form blocks or to a different (alias) name. This can be convenient when you take advantage of the default name "form_reform" when adding a single form to a page, but would like a more specific name for the saved form data.
A form submission may optionally update an existing response by matching one or more criteria of the response.
When a user is completing multiple forms, to keep the data from growing, old submissions may be cleared.
Name
Form items may optionally be redacted from the data that is saved. For example, to remove a password from the saved data. Redacted items are listed by input_name.
Where suggestions are offered, these are only suggestions. Other input names/handles may exist in the form and may be entered.

Comment

Insert a comment. Make a comment or note within the pipeline. This handler has no effect on pipeline processing.
The data for the repeatable group is already saved to the session.
For convenience generating the message, we use the aggregating placeholder {{all_group:team_members.first_name last_name}} to build a list of the assembled names in the team.

Message

Create a form response message to be displayed to the user. Build boilerplate for a response message, fill the boilerplate with form and site parameters and select a level to emphasize the message display. All text fields can use {{place_holders}} to be filled with system or entered form values.
The level of a message will also affect the Hide/Do-not-render state of subsequent form controls
   

Comment

Insert a comment. Make a comment or note within the pipeline. This handler has no effect on pipeline processing.
The condition below is purely for demonstrating UTM tags. If you don't use UTM, you can ignore this condition.

Condition If

Check a condition and either proceed or move forwards to an alternative. The handlers ConditionIf, ConditionElseIf, ConditionElse and ConditionEnd manage a single level of conditional processing in form handling.
     
     
     
     

Message

Create a form response message to be displayed to the user. Build boilerplate for a response message, fill the boilerplate with form and site parameters and select a level to emphasize the message display. All text fields can use {{place_holders}} to be filled with system or entered form values.
The level of a message will also affect the Hide/Do-not-render state of subsequent form controls
   

Condition End

Denotes end of condition processing. The handlers ConditionIf, ConditionElseIf, ConditionElse and ConditionEnd manage a single level of conditional processing in form handling.

On Error

Denotes error processing. On Error and On Success should always be used in together to denote processing for errors and processing for no errors. Either may be used first.

Message

Create a form response message to be displayed to the user. Build boilerplate for a response message, fill the boilerplate with form and site parameters and select a level to emphasize the message display. All text fields can use {{place_holders}} to be filled with system or entered form values.
The level of a message will also affect the Hide/Do-not-render state of subsequent form controls
   

Specific handling for each item in a group

Our second submit pipeline - Submit 2 - illustrates iterating through each repetition of a group of inputs. The new part of our pipeline is between Iterate Repeatable Group and Iterate Repeatable Group End. This pair of handlers provides a way of acting on each repetition of a group in turn. All we are dosing here is aggregating names in a less elegant way than the pipeline above.

In a real world application, perhaps this could be providing handling specific to each group member such as a personalized email.

Once again the second Condition If section towards the end of our pipeline is to add a display of any UTM tags, as described in Example - Tracking UTM tags. If you are not using Form Reform UTM, you can ignore that part of the pipeline.

If you have already tried the Submit button above, refresh the page , make sure you have completed the form, and click the green Submit 2 button immediately below to the right and see the same form data used in Iterate Repeatable Group.

Handler pipeline for: Submit 2


Handlers in the pipeline will be applied in sequence when a form is submitted.

Spam Detect

Configure multiple spam detection strategies. Each spam detection strategy can be separately enabled to either fail silently or to provide an error message that can then be managed through the On Error handlder.
Check for spam using the core Anti-Spam service.
Check using the core Banned Words service. Use this with caution on multilingual sites. A banned word in one language could be perfectly acceptable in another language.
Check using the core IP Deny list. The IP Deny service maintains a dynamic blacklist and whitelist of IP addresses. If an IP address is not in the whitelist it is checked against the blacklist.
Check if the submission contains URLs. URL inputs are exempt from this check.
Check if the submission contains <html> tags. Rich Text inputs are exempt from this check.
Check if the submission contains <script> tags. This should normally be enabled.
Some blocks such as the Honeypot and Captcha also detect spam. Their detection response can be managed by the normal form validation error handling , or by direct integration with this Spam Detect handler.

Validate Input Fields

Validate form input fields. Validate the form input fields provided by each block in the form. Provides a list of errors as {{errors:list}} if validation fails.

On Success

Denotes success processing (no errors). On Error and On Success should always be used in together to denote processing for errors and processing for no errors. Either may be used first.

Comment

Insert a comment. Make a comment or note within the pipeline. This handler has no effect on pipeline processing.
Here we show another way of handling a repeatable group, by iterating through each repetition of the group in turn.

Iterate Repeatable Group

Iterate over items in a repeatable group. The handlers IterateRepeatableGroup and IterateRepeatableGroupEnd manage iteration over each item in a repeatable group.

Extend Form Data

Extend or modify the submitted form data with additional names/values. Attach one or more parameters as name => value pairs as additional data to the form response or any other placeholder category. Names and values may both use {{place_holders}} to be filled with system or entered form values.
     
     
     
     
     
Category (Default to 'form') Name/key Value
Only the form category will be saved with the form data. Other categories are for subsequent use in the current pipeline.

Iterate Repeatable Group End

Denotes end of iteration over a repeatable group. The handlers IterateRepeatableGroup and IterateRepeatableGroupEnd manage iteration over each item in a repeatable group.

Save to Session

Save form submission to session data. Data extracted from form fields is saved to the visitor/user session data. This is transient data that lasts for the duration of the Concrete CMS session. The primary reason for saving to a session is to enable values to be recovered and inserted into the same or other forms.
A form can be saved to the name configured by the form blocks or to a different (alias) name. This can be convenient when you take advantage of the default name "form_reform" when adding a single form to a page, but would like a more specific name for the saved form data.
A form submission may optionally update an existing response by matching one or more criteria of the response.
When a user is completing multiple forms, to keep the data from growing, old submissions may be cleared.
Name
Form items may optionally be redacted from the data that is saved. For example, to remove a password from the saved data. Redacted items are listed by input_name.
Where suggestions are offered, these are only suggestions. Other input names/handles may exist in the form and may be entered.

Message

Create a form response message to be displayed to the user. Build boilerplate for a response message, fill the boilerplate with form and site parameters and select a level to emphasize the message display. All text fields can use {{place_holders}} to be filled with system or entered form values.
The level of a message will also affect the Hide/Do-not-render state of subsequent form controls
   

Comment

Insert a comment. Make a comment or note within the pipeline. This handler has no effect on pipeline processing.
The condition below is purely for demonstrating UTM tags. If you don't use UTM, you can ignore this condition.

Condition If

Check a condition and either proceed or move forwards to an alternative. The handlers ConditionIf, ConditionElseIf, ConditionElse and ConditionEnd manage a single level of conditional processing in form handling.
     
     
     
     

Message

Create a form response message to be displayed to the user. Build boilerplate for a response message, fill the boilerplate with form and site parameters and select a level to emphasize the message display. All text fields can use {{place_holders}} to be filled with system or entered form values.
The level of a message will also affect the Hide/Do-not-render state of subsequent form controls
   

Condition End

Denotes end of condition processing. The handlers ConditionIf, ConditionElseIf, ConditionElse and ConditionEnd manage a single level of conditional processing in form handling.

On Error

Denotes error processing. On Error and On Success should always be used in together to denote processing for errors and processing for no errors. Either may be used first.

Message

Create a form response message to be displayed to the user. Build boilerplate for a response message, fill the boilerplate with form and site parameters and select a level to emphasize the message display. All text fields can use {{place_holders}} to be filled with system or entered form values.
The level of a message will also affect the Hide/Do-not-render state of subsequent form controls
   

Form Reform blocks used

Source Page / Stack Form Name Block Type Input Name
Example - Repeatable Groups form_reform Text Input team_name
Example - Repeatable Groups form_reform Email Input email
Example - Repeatable Groups form_reform Repeatable Group team_members
Example - Repeatable Groups form_reform Message Display
Example - Repeatable Groups form_reform Spinner
Example - Repeatable Groups form_reform Honeypot more
Example - Repeatable Groups form_reform Captcha
Example - Repeatable Groups form_reform Submit Button submit
Example - Repeatable Groups form_reform Submit Button submit_2
Example - Repeatable Groups form_reform Text Input first_name
Example - Repeatable Groups form_reform Text Input last_name
Developer Analysis

Additional Pages

Reform the way you add new input controls

If you need a specialized template or a custom input element, you can design new templates  or new block types for form elements as you would any block type.

Blocks are easy for third party addition or extension. Block templates and are the first thing any Concrete CMS developer learns to code. They are one of the easiest things to code. The underlying mechanisms are well established and reliable.

Reform what you can do with form data

Form handlers are built about the same extensible plugin system as many of my other addons (Universal Content Puller, Omni Gallery, Extreme Clean ...).

The whole system is aimed at easy extension within Form Reform, by third party addons, by agencies and by site building developers.

Handlers can be easily added to do whatever you want with the form data.

Reform where you can save form data

Saving form data with Form Reform is simply a handler in the processing pipeline. You can save to multiple locations or just one location.

If you need to save data elsewhere, such as to a dedicated table, a table provided through another addon, to another database, send it to an API, forward it to another server, or anywhere you can imagine, you can adapt or develop a form handler to do so.

The complexity of the code depends on where you are saving or sending the data, but wrapping that into a form handler plugin for Form Reform is straight forward.

The Form Reform handler plugin system is designed for easy extension.

Form Reform

Reform the way forms are built. Build a form out of blocks. Take control of how form submissions are processed and how the submitted data is stored. Easy to extend. Easy to reconfigure. Tangible data. Easy to add your own integrations.

Form Reform Display

List and display form submissions from Form Reform.

Form Reform UTM

Not just Form Reform and not just UTM! Capture and hold incoming UTM (or other) tags and make the tag values available to Form Reform and/or Conditional Redirect as {{place_holders}}. You don't need Form Reform to use this.

Form Reform Dynamics

Form handlers for querying Microsoft Dynamics, forwarding and updating form data to Microsoft Dynamics.

Snapshot

A suite of advanced image capture and upload tools. Enhanced drag and drop file uploading. Make screengrabs from within Concrete CMS. Capture images directly from device webcams. Edit images before uploading.

Form Reform Attributes, Express and Users

Save submitted forms to Express objects and user attributes. Add and remove users from groups.

Form Reform Image Picker

Form Reform Image Picker provides an image picking input block for Form Reform. The Image Picker Input is preconfigured to connect to most Omni Gallery gallery and slider display widgets, the core gallery block, and thumbnail showing templates for the core page list block. Advanced settings allow the Image Picker Input to be configured to pick images from other galleries and sliders.

Form Reform Data Picker

Form Reform Data Picker provides data picking input blocks for Form Reform. The Table Picker Input is preconfigured to connect to Universal Content Puller table display widgets. Advanced settings allow the Table Picker Input to be configured to pick data from other HTML tables.

Form Reform Macros

Extends Form Reform with form handler macros. Provides a new dashboard page at System & Settings > Form Reform > Form Reform Macros to manage macros, and form handlers to run macros.

Form Reform Developer

A growing suite of resources to assist those developing blocks, handlers and more complex forms for Form Reform.

Learn with a simple form

While you may have plans to implement some much more complex forms using Form Reform, we strongly recommend you start with a simple form such as our contact form example in order to review the basic principles of using Form Reform before you move onto anything bigger.

  1. Start by submitting the form at Getting Started - Your First Form a few times, even making some deliberate mistakes.
  2. Watch our Getting Started with Form Reform video to see how the form is built.
  3. Read through the rest of Getting Started - Your First Form for more details of how this form is built.
  4. Create a test page on your site to build your own version of Getting Started - Your First Form and experiment.
  5. Develop your test page with some of the concepts introduced by our further examples and experiment with some of the other form inputs.