ProFields: Multiplier field type

This Fieldtype and Inputfield combination lets you take almost any existing single-value Fieldtype, and use it to a multi-value Fieldtype.

Single value Fieldtypes are those that store one piece of information at a time, for example: Text, Textarea, Integer, Float, Email, URL, etc. Any of these, and more can be multiplied with this Multiplier fieldtype. The Multiplier fieldtype lets you use a defined or variable quantity. You setup the minimum and maximum limits when defining the field. If you want a single defined quantity, then you simply set the minimum and maximum to be the same number. From the admin side, inputs in a Multiplier can optionally be drag-and-drop sorted by the user.

Multiplier is part of the ProcessWire ProFields package available from the ProcessWire Store.

We recommend viewing full-screen and increasing the quality to 720p. This video includes narration (sound) as well.

Example

Lets say that we are building an employee directory. For each employee, we need to support between 1 and 3 email addresses in their contact information. Typically (without Multiplier) we would create 3 separate Email fields:

  • employee_email1
  • employee_email2
  • employee_email3

Now that you've got Multiplier, you can instead accomplish this with just one field:

  • employee_emails

The resulting value is simply a WireArray of "Email" fields. This is a very simple example, but consider how much farther this could be taken in our employee directory. We can use this for the employee's phone numbers, list of locations, interests, departments, and so on.

Basically, anytime you've got a instance where you are creating multiple fields of the same type, you may find Multiplier to be a better solution. Unlike the alternative, Multiplier fields only take up 1 field in your system, and the values of the multiplier can be optionally sortable. So if an employee's primary email address changes (for example) you can simply add the new email address and drag it to the top of the list.

Full documentation is available in the ProFields support board.

Multiplier is part of the ProcessWire ProFields package available from the ProcessWire Store.

Latest news

  • ProcessWire Weekly #554
    In the 554th issue of ProcessWire Weekly we'll check out the latest core updates, introduce a couple of new third party modules, and more. Read on!
    Weekly.pw / 21 December 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“To Drupal, or to ProcessWire? The million dollar choice. We decided to make an early switch to PW. And in retrospect, ProcessWire was probably the best decision we made. Thanks are due to ProcessWire and the amazing system and set of modules that are in place.” —Unni Krishnan, Founder of PigtailPundits