InputfieldText class

An Inputfield for handling single line “text” form inputs

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

Show class?     Show args?       Only hookable?    

Properties

NameReturnSummaryDefault
InputfieldText::autocomplete string null HTML5 autocomplete attribute, used only by text and email, not other descending types 3.0.252+ null
InputfieldText::initValue string Optional initial/default value blank
InputfieldText::maxlength int Maximum allowed length of value or 0 for no min 0
InputfieldText::minlength int Minimum allowed length of value or 0 for no max (usually combined with 'required' option) 0
InputfieldText::noTrim bool By default whitespace is trimmed from value, set this to true to bypass that behavior .false
InputfieldText::pattern string HTML5 pattern attribute for front-end validation blank
InputfieldText::placeholder string Placeholder attribute text blank
InputfieldText::requiredAttr bool int When combined with "required" option, this also makes it use the HTML5 "required" attribute. false
InputfieldText::showCount int Show a character counter (1) or word counter (2) or neither (0). Recommended value is 1 when using minlength or maxlength. 0
InputfieldText::size int Size of input or 0 for full width 0
InputfieldText::stripTags bool Should HTML tags be stripped from value? false
InputfieldText::type string Input type text
InputfieldText::useLanguages bool When combined with multi-language support, setting this to true will provide one input per language. Get/set each language value with the "value[languageID]" property, and just "value" for default language. false

Additional methods and properties

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

API reference based on ProcessWire core version 3.0.251