Using other blocks in forms

Form elements are just blocks!

The key feature of Form Reform that you don't get with other forms systems for ConcreteCMS is that

every form element is just another block.

That makes it easy to arrange form elements into the layout you require. It also means you can mix other block type into forms. You can have extra content blocks, maps, images and any kind of block interspersed with Form Reform blocks to design and explain your forms.

This works easily with a single step form that when completed form redirects to another page with a completion message. You don't need to worry about visibility of blocks in form states because you are now on another page with your content thanking a visitor for completing the form.

But Form Reform is incredibly flexible. You can use it to build forms with other workflows. For example,

  • A single step form shows a completion message on the same page.
  • A multi-step form shows different Form Reform blocks with each step.

In those cases, the behaviour tab of each Form Reform block can be used to determine which blocks are hidden, disabled or even not rendered with each step or when the success message is shown.

That is fine for Form Reform blocks, but what about other blocks mixed in with the form? How can we manage their visibility?

Block visibility is managed using some Form Reform classes. These classes are added to the header of any page containing a Form Reform block, adapted for the name of the form on the page. You can add these classed to any block/layout/container or area on the page using block design or the equivalent.

General help for Form State Classes

Forms can be in one or more of the following states. Forms begin in Step 1. Each state has an associated class that can be used to hide blocks when a form is in that state. These states are built into Form Reform blocks and can be added to other blocks using block design.

The general format is:
jl_form_reform_[form_name]_hide_when_[state].

The most likely requirement for other blocks used with form controls is to Hide when a Success message is shown.

Class Hide When
jl_form_reform__form_reform_hide_when_success Success message is shown
jl_form_reform__form_reform_hide_when_warning Warning message is shown
jl_form_reform__form_reform_hide_when_danger Danger / Error message is shown
jl_form_reform__form_reform_hide_when_primary Primary message is shown
jl_form_reform__form_reform_hide_when_secondary Secondary message is shown
jl_form_reform__form_reform_hide_when_info Info message is shown
jl_form_reform__form_reform_hide_when_light Light message is shown
jl_form_reform__form_reform_hide_when_dark Dark message is shown
jl_form_reform__form_reform_hide_when_1 On form step 1
jl_form_reform__form_reform_hide_when_2 On form step 2
jl_form_reform__form_reform_hide_when_3 On form step 3
jl_form_reform__form_reform_hide_when_4 On form step 4
jl_form_reform__form_reform_hide_when_5 On form step 5
jl_form_reform__form_reform_hide_when_user_is_guest User is Guest
jl_form_reform__form_reform_hide_when_user_is_registered User is Registered

A quick way of finding the state classes for your form

If you are ever wondering what state classes are available for the current form, in Edit Mode have a look at the Submit Block and the Classes Help tab. The tab provides a list of available classes similar to the above.

The above states are specific to a theme, so here they show states specific to Atomik. The states adapt automatically to Bootstrap 3,4,5, Atomik and Elemental derived themes. They may also adapt automatically to other themes. Where they do not, a theme can be adapted by implementing the interface /JtF/FormReform/FormState/AlertLevelInterface in the theme's PageTheme class.

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.