Form Reform Macros

  • thumbnail.png
  • 01_pipeline_with_macro.png
  • 02a_edit_macro.png
  • 02b_edit_macro.png
  • 03_developer_validation.png

Extend Form Reform with form handler macros.

Build sequences of form handlers into a library of macros. Form Reform Macros provides a new dashboard page at System & Settings > Form Reform > Form Reform Macros to manage macros, and a Macro form handler to run macros within a form handler pipeline.

Usage

Use macros to:

  • Add structure to longer processing pipelines.
  • Centrally manage handlers with more complex settings.
  • Re-use common sequences of handlers

Example Use-Cases

Common Validation

Suppose you have some complex validation requirements common to more than one form. Perhaps the usual input validation and spam detection is then followed by a Condition If ... Condition End sequence that validates a relationship between inputs and uses Set Error to set one or more errors, or a list of Set Error Conditional handlers.

Such a sequence could be saved into a macro and then inserted where you need it at the start of relevant submit pipelines with a single Macro form handler.

Email

A common form handling pattern is to send an acknowledgement email to the visitor, then send a notification email to one or more staff depending on form data. Such a pipeline can easily be configured by combining email and condition form handlers.

Configuring that sequence in a macro enables it to be easily slotted in across multiple forms.

Prototyping

Getting really advanced, perhaps you have a particularly long or complex sequence of form handling in mind. Long sequences of handlers can result in long processing time, so your first thought on a solution is a custom form handler.

Before getting involved in building a custom form handler to implement such a requirement, one or more macros could be configured and combined to prototype it. This will enable the overall logic to be tested and demonstrated to your customer or users, overall timing to be evaluated, and development work be targeted where needed.