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)
string int float bool array object nullGet 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($item)
$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()
InputfieldWrapper InputfieldsArrayGet all Inputfields below this recursively in a flat InputfieldWrapper (children, and their children, etc.) 
InputfieldWrapper::getByAttr(string $attrName, string $attrValue)
Inputfield nullGiven an attribute name and value, return the first matching Inputfield or null if not found 
InputfieldWrapper::getByName(string $name)
Inputfield nullShorter alias of getChildByName() 
InputfieldWrapper::getChildByName(string $name)
Inputfield InputfieldWrapper nullGiven an Inputfield name, return the child Inputfield or NULL if not found. 
InputfieldWrapper::getErrors()
arrayReturn an array of errors that occurred on any of the children during input processing. 
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 

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

Twitter updates

  • New TinyMCE 6.2.0 Inputfield released for ProcessWire— More
    28 October 2022
  • This week we take a look at a new rich text editor for ProcessWire, why we chose it, some highlights, screenshots, and why we think you’ll like it— More
    21 October 2022
  • This week we have ProcessWire 3.0.206 on the dev branch and a new version of the ProDevTools UserActivity module, which we'll take a closer look at in this post— More
    7 October 2022

Latest news

  • ProcessWire Weekly #447
    In the 447th issue of ProcessWire Weekly we'll share the latest core updates, introduce a new third party module called RockVideoThumbnailGrabber, and more. Read on!
    Weekly.pw / 3 December 2022
  • New rich text editor for ProcessWire
    This week we take a look at a new rich text editor for ProcessWire, why we chose it, some highlights, screenshots, and why we think you’ll like it.
    Blog / 21 October 2022
  • Subscribe to weekly ProcessWire news

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer