InputfieldText class

Single line of text

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?        

Common

NameReturnSummary 
InputfieldText::getAttributes()
arrayGet all attributes in an associative array 
InputfieldText::getConfigAllowContext(Field $field)
arrayGet array of field names allowed for field/template context
InputfieldText::getConfigInputfields()
InputfieldWrapperGet field configuration
InputfieldText::getDefaultMaxlength()
intGet the default maxlength attribute value 
InputfieldText::initValue string Optional initial/default value 
InputfieldText::maxlength int Maximum allowed length of value 
InputfieldText::minlength int Minimum allowed length of value (usually combined with 'required' option) 
InputfieldText::noTrim bool By default whitespace is trimmed from value, set this to true to bypass that behavior (default=false). 
InputfieldText::pattern string HTML5 pattern attribute 
InputfieldText::placeholder string Placeholder attribute text 
InputfieldText::processInput(WireInputData $input)
$thisProcess input
InputfieldText::render()
stringRender Inputfield
InputfieldText::renderReady()
boolRender ready 
InputfieldText::renderValue()
stringRender just the value (not input) in text/markup for presentation purposes.
InputfieldText::requiredAttr bool int When combined with "required" option, this also makes it use the HTML5 "required" attribute. (default=false) 
InputfieldText::setAttribute($key, $value)
Inputfield InputfieldText thisSet an attribute 
InputfieldText::showCount int Show a character counter (1) or word counter (2) or neither (0). Recommended value is 1 when using minlength or maxlength. 
InputfieldText::size int Size of input or 0 for full width 
InputfieldText::stripTags bool Should HTML tags be stripped from value? 
InputfieldText::type string Input type (typically "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.  
InputfieldText::wired()
(nothing)Wired to API 

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.236

Latest news

  • ProcessWire Weekly #518
    The 518th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
    Weekly.pw / 13 April 2024
  • ProFields Table Field with Actions support
    This week we have some updates for the ProFields table field (FieldtypeTable). These updates are primarily focused on adding new tools for the editor to facilitate input and management of content in a table field.
    Blog / 12 April 2024
  • Subscribe to weekly ProcessWire news

“We chose ProcessWire because of its excellent architecture, modular extensibility and the internal API. The CMS offers the necessary flexibility and performance for such a complex website like superbude.de. ProcessWire offers options that are only available for larger systems, such as Drupal, and allows a much slimmer development process.” —xport communication GmbH