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 Inputfield
class also inherits all the methods and properties of: Inputfield, WireData and Wire.
Common
Properties
Name | Return | Summary | Default |
---|---|---|---|
Inputfield | string null | HTML5 autocomplete attribute, used only by text and email, not other descending types 3.0.252+ | null |
Inputfield | string | Optional initial/default value | blank |
Inputfield | int | Maximum allowed length of value or 0 for no min | 0 |
Inputfield | int | Minimum allowed length of value or 0 for no max (usually combined with 'required' option) | 0 |
Inputfield | bool | By default whitespace is trimmed from value, set this to true to bypass that behavior . | false |
Inputfield | string | HTML5 pattern attribute for front-end validation | blank |
Inputfield | string | Placeholder attribute text | blank |
Inputfield | bool int | When combined with "required" option, this also makes it use the HTML5 "required" attribute. | false |
Inputfield | int | Show a character counter (1) or word counter (2) or neither (0). Recommended value is 1 when using minlength or maxlength. | 0 |
Inputfield | int | Size of input or 0 for full width | 0 |
Inputfield | bool | Should HTML tags be stripped from value? | false |
Inputfield | string | Input type | text |
Inputfield | 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, Inputfield
API reference based on ProcessWire core version 3.0.251