InputfieldWrapper class

A type of Inputfield that contains other Inputfield objects as children. Commonly a form or a fieldset.

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

Show class?             Show args?        

Common

NameReturnSummary 
InputfieldWrapper::InputfieldAsmSelect InputfieldAsmSelect 
InputfieldWrapper::InputfieldButton InputfieldButton 
InputfieldWrapper::InputfieldCheckbox InputfieldCheckbox 
InputfieldWrapper::InputfieldCheckboxes InputfieldCheckboxes 
InputfieldWrapper::InputfieldCkeditor InputfieldCKEditor 
InputfieldWrapper::InputfieldCommentsAdmin InputfieldCommentsAdmin 
InputfieldWrapper::InputfieldDatetime InputfieldDatetime 
InputfieldWrapper::InputfieldEmail InputfieldEmail 
InputfieldWrapper::InputfieldFieldset InputfieldFieldset 
InputfieldWrapper::InputfieldFieldsetOpen InputfieldFieldsetOpen 
InputfieldWrapper::InputfieldFieldsetTabOpen InputfieldFieldsetTabOpen 
InputfieldWrapper::InputfieldFile InputfieldFile 
InputfieldWrapper::InputfieldFloat InputfieldFloat 
InputfieldWrapper::InputfieldForm InputfieldForm 
InputfieldWrapper::InputfieldHidden InputfieldHidden 
InputfieldWrapper::InputfieldIcon InputfieldIcon 
InputfieldWrapper::InputfieldImage InputfieldImage 
InputfieldWrapper::InputfieldInteger InputfieldInteger 
InputfieldWrapper::InputfieldMarkup InputfieldMarkup 
InputfieldWrapper::InputfieldName InputfieldName 
InputfieldWrapper::InputfieldPage InputfieldPage 
InputfieldWrapper::InputfieldPageAutocomplete InputfieldPageAutocomplete 
InputfieldWrapper::InputfieldPageListSelect InputfieldPageListSelect 
InputfieldWrapper::InputfieldPageListSelectMultiple InputfieldPageListSelectMultiple 
InputfieldWrapper::InputfieldPageName InputfieldPageName 
InputfieldWrapper::InputfieldPageTable InputfieldPageTable 
InputfieldWrapper::InputfieldPageTitle InputfieldPageTitle 
InputfieldWrapper::InputfieldPassword InputfieldPassword 
InputfieldWrapper::InputfieldRadios InputfieldRadios 
InputfieldWrapper::InputfieldRepeater InputfieldRepeater 
InputfieldWrapper::InputfieldSelect InputfieldSelect 
InputfieldWrapper::InputfieldSelectMultiple InputfieldSelectMultiple 
InputfieldWrapper::InputfieldSelector InputfieldSelector 
InputfieldWrapper::InputfieldSubmit InputfieldSubmit 
InputfieldWrapper::InputfieldText InputfieldText 
InputfieldWrapper::InputfieldTextTags InputfieldTextTags 
InputfieldWrapper::InputfieldTextarea InputfieldTextarea 
InputfieldWrapper::InputfieldToggle InputfieldToggle 
InputfieldWrapper::InputfieldURL InputfieldURL 
InputfieldWrapper::InputfieldWrapper InputfieldWrapper 
InputfieldWrapper::InputfieldlFieldsetClose InputfieldFieldsetClose 
InputfieldWrapper::getValueByName(string $name)
mixedGet value of Inputfield by name 
InputfieldWrapper::insert($item, $existingItem)
$thisInsert new or existing Inputfield before or after another 
InputfieldWrapper::wired()
(nothing)Wired to API 

Manipulation

NameReturnSummary 
InputfieldWrapper::add($item)
Inputfield InputfieldWrapper thisAdd an Inputfield item as a child (also accepts array definition) 
InputfieldWrapper::append(Inputfield $item)
$thisAppend an Inputfield to this instance’s children. 
InputfieldWrapper::import($items)
$thisImport the given Inputfield items as children 
InputfieldWrapper::importArray(array $a)
$thisImport an array of Inputfield definitions to to this InputfieldWrapper instance 
InputfieldWrapper::insertAfter($item, $existingItem)
$thisInsert one Inputfield after one that’s already there. 
InputfieldWrapper::insertBefore($item, $existingItem)
$thisInsert one Inputfield before one that’s already there. 
InputfieldWrapper::new(string $typeName)
Inputfield InputfieldSelect InputfieldWrapperCreate a new Inputfield, add it to this InputfieldWrapper, and return the new Inputfield
InputfieldWrapper::populateValues($data)
arrayPopulate values for all Inputfields in this wrapper from the given $data object or array. 
InputfieldWrapper::prepend(Inputfield $item)
$thisPrepend an Inputfield to this instance’s children. 
InputfieldWrapper::remove($key)
$thisRemove an Inputfield from this instance’s children. 

Retrieval and traversal

NameReturnSummary 
InputfieldWrapper::child()
Inputfield nullFind an Inputfield below this one that has the given name 
InputfieldWrapper::children()
InputfieldsArrayReturn all children Inputfield objects
Can also be used as property: InputfieldWrapper::children
 
InputfieldWrapper::count()
intReturn the quantity of children present 
InputfieldWrapper::find(string $selector)
InputfieldsArrayFind all children Inputfields matching a selector string 
InputfieldWrapper::get(string $key)
Inputfield mixedGet a child Inputfield having a name attribute matching the given $key. 
InputfieldWrapper::getAll()
InputfieldsArrayGet all Inputfields below this recursively in a flat InputfieldWrapper (children, and their children, etc.) 
InputfieldWrapper::getByAttr(string $attrName, string $attrValue)
Inputfield InputfieldWrapper nullGiven an attribute name and value, return the first matching Inputfield or null if not found 
InputfieldWrapper::getByName(string $name)
Inputfield InputfieldWrapper nullShorter alias of getChildByName() 
InputfieldWrapper::getChildByName(string $name)
Inputfield InputfieldWrapper nullGiven an Inputfield name, return the child Inputfield or NULL if not found. 
InputfieldWrapper::getIterator()
InputfieldsArrayEnables foreach() of the children of this class 
InputfieldWrapper::isEmpty()
boolReturns true if all children are empty, or false if one or more is populated 

Errors

NameReturnSummary 
InputfieldWrapper::getErrorInputfields()
array InputfieldGet Inputfield objects that have errors 
InputfieldWrapper::getErrors()
arrayReturn an array of errors that occurred on any of the children during input processing. 

Additional methods and properties

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

API reference based on ProcessWire core version 3.0.236

Latest news

  • ProcessWire Weekly #519
    In the 519th issue of ProcessWire Weekly we'll check out a new third party module called RockForms, introduce the latest ProcessWire core updates, and more. Read on!
    Weekly.pw / 20 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

“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