PageFieldInfo by Robin S

Adds information about options in Page Reference fields.

Page Field Info

A module for ProcessWire CMS/CMF. Adds information about options in Page Reference fields. Supports InputfieldSelect and inputfields that extend InputfieldSelect:

  • InputfieldSelect
  • InputfieldRadios
  • InputfieldSelectMultiple
  • InputfieldCheckboxes
  • InputfieldAsmSelect

Requires ProcessWire >= 3.0.61 and AdminThemeUikit.

Screenshots


Field config

Field config

Example of changes to inputfield

Inputfield

Example of info field filled out in Page Edit

Page Edit

Installation


Install the Page Field Info module.

Configuration


In the Input tab of the settings for a Page Reference field...

  • Tick the "Add info tooltips to options" checkbox to enable tooltips for the options in the field. Tooltips are not possible for Select or AsmSelect inputfield types so for those types you would want to tick the next option.
  • Tick the "Append info about selected options" checkbox to append information about the selected options to the bottom of the inputfield. If the Page Reference field is a "multiple pages" field then the info for each selected option will be prefixed with the option label (so the user will know what option each line of info relates to).
  • In the "Info field" dropdown select a text/textarea field that will contain information about the page, to be used in the tooltips and appended info. Of course this field should be in the template(s) of the selectable pages for the Page Reference field.

Hook

In most cases the "Info field" will supply the text for the tooltips and appended info, but for advanced usages you can hook PageFieldInfo::getPageInfo() to return the text.

$wire->addHookAfter('PageFieldInfo::getPageInfo', function(HookEvent $event) {
    $page = $event->arguments(0); // The page
    $inputfield = $event->arguments(1); // InputfieldPage
    $field = $event->arguments(2); // The Page Reference field
    $info = $event->return; // Text from the info field, if any
    // Set some custom text as the $event->return...
});

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

Latest news

  • ProcessWire Weekly #559
    The 559th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
    Weekly.pw / 25 January 2025
  • ProcessWire 3.0.244 new main/master version
    ProcessWire 3.0.244 is our newest main/master/stable version. It's been more than a year in the making and is packed with tons of new features, issue fixes, optimizations and more. This post covers all the details.
    Blog / 18 January 2025
  • Subscribe to weekly ProcessWire news

“We were really happy to build our new portfolio website on ProcessWire! We wanted something that gave us plenty of control on the back-end, without any bloat on the front end - just a nice, easy to access API for all our content that left us free to design and build however we liked.” —Castus, web design agency in Sheffield, UK