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 #490
    In the 490th issue of ProcessWire Weekly we'll check out what's new in the latest core version ProcessWire 3.0.229, introduce a brand-new third party module, and more. Read on!
    Weekly.pw / 30 September 2023
  • ProcessWire 3.0.226 new main/master version
    After 8 months in development we are excited to bring you ProcessWire 3.0.226 main/master. This version has a ton of great new features, improvements and optimizations, plus more than 100 issue fixes. This post takes an in-depth look at highlights from this great new version.
    Blog / 25 August 2023
  • Subscribe to weekly ProcessWire news

I just love the easy and intuitive ProcessWire API. ProcessWire rocks!” —Jens Martsch, Web developer