About Page Reference Default Value

Allows a default value to be defined for certain Page Reference inputfield types that don't already support a default value.

Category Admin Helpers
Admin helper modules are those that provide helpful tools, UI enhancements or optimizations to the admin panel (excluding Fieldtype or Inputfield modules).
Release StateBeta
Close to stable, but users are advised to be cautious and test thoroughly.*
Authorrobin-s
Module Version0.1.0
Class NamePageReferenceDefaultValue
Compatibility3.0
Date AddedJuly 19, 2020
Recommended ByNew recommendations may take up to 1 day to appear.

Instructions

This module's files should be placed in /site/modules/PageReferenceDefaultValue/
How to install or uninstall modules

README

Page Reference Default Value

Most ProcessWire core inputfield types that can be used with a Page Reference field support a "Default value" setting. This module extends support for default values to the following core inputfield types:

  • Page List Select
  • Page List Select Multiple
  • Page Autocomplete (single and multiple)

Seeing as these inputfield types only support the selection of pages a Page List Select / Page List Select Multiple is used for defining the default value instead of the Text / Textarea field used by the core for other inputfield types. This makes defining a default value a bit more user-friendly.

Note that as per the core "Default value" setting, the Page Reference field must be set to "required" in order for the default value to be used.

Screenshot

default-value