FieldtypeEvents by Ryan Cramer

Field that stores a table of events for a page. This modules serves as an example of creating an editable table of data as a Fieldtype and Inputfield in ProcessWire.

FieldtypeEvents (and InputfieldEvents)

This modules serves as an example of creating an editable table of data as a Fieldtype and Inputfield in ProcessWire. In this case, we create a simple table of events each with date and title. This pattern can be adapted to nearly any table of information.

Note that this module is intended as a proof-of-concept. If you find it useful for the example scenario (events) then great, but keep in mind it is not intended as a comprehensive events solution, where using ProcessWire pages may be a better fit. If you use this Fieldtype then chances are you'll want to use it as a starting point for further development rather than as a final solution.


If you are using a previous version of this module, please note that this one is different and simplified from the previous version. As a result, if you are actually using the module for real (rather than an example or demo) then you shouldn't upgrade.


  1. Copy the files for this module to /site/modules/FieldtypeEvents/
  2. In admin: Modules > Refresh. Install Fieldtype > Events.
  3. Create a new field of type Events, and name it whatever you would like. In our examples we named it simply "events".
  4. Add the field to a template and edit a page using that template.


A typical output case for this module would work like this:

foreach($page->events as $event) {
  echo "
      Date: $event->date<br />
      Title: $event->title

Finding events

This fieldtype includes an indexed date field and fulltext indexed title field so that you can locate events by date or text.

// find all pages that have events after May 1, 2021
$results = $pages->find('>2021-05-01');

// find all pages that have expired events
$results = $pages->find('<today');

// find all pages with events in January, 2022
$results = $pages->find(">=2022-01-01,<2022-02-01");

// find all pages with events that have the word “convention” in the title
$results = $pages->find("events.title~=convention");

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Twitter updates

  • ProcessWire 3.0.185 (dev) core updates, plus new Session Allow module— More
    17 September 2021
  • Three new ProcessWire Textformatter modules: Find/Replace, Markdown in Markup, and Emoji— More
    3 September 2021
  • This week we have a new master version released after a year in the making. With nearly 40 pull requests, hundreds of new additions and more than 100 issue reports resolved, this new version has a ton of great new stuff— More
    27 August 2021

Latest news

  • ProcessWire Weekly #385
    In the 385th issue of ProcessWire Weekly we'll cover the latest weekly update from Ryan, check out a new fieldtype module called Page Reference Context Data, and more. Read on! / 25 September 2021
  • ProcessWire 3.0.184 new master/main version
    This week we have a new master/main version released after a full year in the making. As you might imagine, this new version has a ton of great new stuff and we’ll try to cover much of it here.
    Blog / 27 August 2021
  • Subscribe to weekly ProcessWire news

“…building with ProcessWire was a breeze, I really love all the flexibility the system provides. I can’t imagine using any other CMS in the future.” —Thomas Aull