InputfieldSelector class

Build a page finding selector visually.

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the InputfieldSelector class also inherits all the methods and properties of: Inputfield, WireData and Wire.

Show class?             Show args?        

Common

NameReturnSummary 
InputfieldSelector::addIcon string [plus-circle] Icon used for the "Add Field" link. 
InputfieldSelector::addLabel string [Add Field] Text used for the "Add Field" link 
InputfieldSelector::allowAddRemove bool [true] Whether to allow adding new rows / removing existing rows 
InputfieldSelector::allowBlankValues bool [false] When no value is present, should it contribute to the selector? 
InputfieldSelector::allowModifiers bool [true] Allow use of modifiers like include, limit? 
InputfieldSelector::allowSubfieldGroups bool [true] Allow @grouping of subfields (like for page references)? 
InputfieldSelector::allowSubfields bool [true] Allow use of subfields? 
InputfieldSelector::allowSubselectors bool [true] Allow use of subselectors? 
InputfieldSelector::allowSystemCustomFields bool [false] Allow system custom fields to appear in field selects? 
InputfieldSelector::allowSystemNativeFields bool [true] Allow system native fields to appear in field selects? 
InputfieldSelector::allowSystemTemplates bool [false] Allow selection of system templates (user, role, etc.)? 
InputfieldSelector::checkboxClass string 
InputfieldSelector::counter bool [true] Whether to show a live "number of matches" indicator. 
InputfieldSelector::dateFormat string [Y-m-d] Default PHP date() format for date fields. 
InputfieldSelector::datePlaceholder string [yyyy-mm-dd] Placeholder attribute text for date fields. 
InputfieldSelector::exclude string One or more (CSV) fields to disallow selection for 
InputfieldSelector::get(string $key)
mixedGet property 
InputfieldSelector::getDefaultSettings()
arrayReturn the default settings 
InputfieldSelector::getParentPages(Template $template)
PageArrayGet parent pages of pages using the given template 
InputfieldSelector::getSelectorInfo($field)
arrayReturns an array of selector information for the given Field or field name 
InputfieldSelector::getSettings()
arrayReturn the configured settings 
InputfieldSelector::groupIdentifier string (1) 
InputfieldSelector::initTemplate Template null [null] Optional context template, used only just 1 allowed (pulled from $initValue automatically). 
InputfieldSelector::initValue string [selector string] Initial value that user can't change. 
InputfieldSelector::inputClass string 
InputfieldSelector::lastSelector string 
InputfieldSelector::limitFields array [empty] Selectable fields whitelist (field names). Leave empty to allow any. 
InputfieldSelector::maxSelectOptions int If quantity of select options exceeds this number, use autocomplete instead for Page reference fields (since 3.0.148) 
InputfieldSelector::maxUsers int [20] Maximum number of users selectable. If more than regular text input used rather than select. 
InputfieldSelector::optgroupsOrder string [system,field,subfield,group,modifier,adjust] Order and presence of field selection option groups. 
InputfieldSelector::parseVars bool [true] Whether variables in a selector should be parsed and converted to values 
InputfieldSelector::preview bool [true] Whether to show a live preview of selector in notes section. 
InputfieldSelector::previewColumns string array [name,template,id] Array or CSV string of columns to show in bookmark previews 
InputfieldSelector::processInput(WireInputData $input)
$thisProcess input submitted to this Inputfield
InputfieldSelector::render()
stringPrimary Inputfield render method
InputfieldSelector::renderRow(string $select, string $subfield, string $opval)
stringRender a selector row <li> 
InputfieldSelector::sanitizeSelectorString($selectorString)
stringSanitize a selector string and return it 
InputfieldSelector::selectClass string 
InputfieldSelector::set(string $key, mixed $value)
this Inputfield WireDataSet property 
InputfieldSelector::setAttribute($key, $value)
InputfieldSelector WireDataSet an attribute to this Inputfield, overridden from Inputfield class 
InputfieldSelector::setup()
(nothing)Setup the shared structures and data used by Selector 
InputfieldSelector::showFieldLabels bool int [false] Show field labels rather than names? Or specify integer 2 to show both. 
InputfieldSelector::showOptgroups bool [true] Whether or not to separate sytem, field, subfields, etc. into their own optgroups. If turned off, all types of fields will be shown together A-Z. 
InputfieldSelector::subfieldIdentifier string ... 
InputfieldSelector::timeFormat string [H:i] Default PHP date() format for time component of date fields. 
InputfieldSelector::timePlaceholder string [hh:mm] Placeholder attribute time component of date fields. 
InputfieldSelector::value string [selector string] Value that user can change. 

Additional methods and properties

In addition to the methods and properties above, InputfieldSelector also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.236

Latest news

  • ProcessWire Weekly #551
    In the 551st issue of ProcessWire Weekly we'll check out what's new in the core this week, share a new weekly poll, and more. Read on!
    Weekly.pw / 1 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

“The end client and designer love the ease at which they can update the website. Training beyond how to log in wasn’t even necessary since ProcessWire’s default interface is straightforward.” —Jonathan Lahijani