InputfieldTextTags class

Enables input of user entered tags or selection of predefined tags.

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

Show class?             Show args?        

Common

NameReturnSummary 
InputfieldTextTags::addOptions(array $options)
selfAdd multiple selectable options 
InputfieldTextTags::allowUserTags int bool Allow user-entered tags? 
InputfieldTextTags::arrayValue array 
InputfieldTextTags::closeAfterSelect int bool Close select dropdown box after user makes selection? 
InputfieldTextTags::delimiter string One of 's' (for space ' '), 'p' (for pipe '|') or 'c' (for comma). 
InputfieldTextTags::getAttributes()
arrayGet all attributes in an associative array 
InputfieldTextTags::maxItems int Max selectable items, 0 for no limit, 1 for single-select mode, or 2+ to limit selection to that number. 
InputfieldTextTags::maxSelectedItems int Alias of maxItems (as used by InputfieldPage) 
InputfieldTextTags::pageSelector string null 
InputfieldTextTags::placeholder string Placeholder string to show when no options selected.  
InputfieldTextTags::setPageSelector(string $selector)
boolSet page selector 
InputfieldTextTags::tagsList array string Array of tags [ 'tag' => 'label' ], or newline separated string of "tag=label", or use addTag() to populate. 
InputfieldTextTags::tagsUrl string Remote URL to find tags from, must have a '{q}' in it somewhere, which will be replaced with the query.  
InputfieldTextTags::useAjax bool int 
InputfieldTextTags::value string 

Helpers

NameReturnSummary 
InputfieldTextTags::tagsArray(Field $field)
arrayStatic utility function to convert a tags string to an array of [ 'tag' => 'label' ] 

Additional methods and properties

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

API reference based on ProcessWire core version 3.0.244

Latest news

  • ProcessWire Weekly #558
    In the 558th issue of ProcessWire Weekly we'll check out the blog post that introduces ProcessWire 3.0.244, share some recent ProcessWire highlights, and more. Read on!
    Weekly.pw / 18 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

“Indeed, if ProcessWire can be considered as a CMS in its own right, it also offers all the advantages of a CMF (Content Management Framework). Unlike other solutions, the programmer is not forced to follow the proposed model and can integrate his/her ways of doing things.” —Guy Verville, Spiria Digital Inc.