InputfieldRepeater class

Maintains a collection of fields that are repeated for any number of times.

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

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
InputfieldRepeater::copyPasteCookieName()
stringGet the copy/paste cookie name 
InputfieldRepeater::getConfigInputfields()
InputfieldWrapper@return InputfieldWrapper
InputfieldRepeater::getWrappers()
array InputfieldWrapperGet the repeater wrappers (InputfieldWrappers) indexed by repeater page ID 
InputfieldRepeater::isEmpty()
boolReturns whether any values are present 
InputfieldRepeater::numPublished()
intReturn quantity of published items 
InputfieldRepeater::numRequiredEmpty()
intGet number of required but empty Inputfields (across all repeater items) 
InputfieldRepeater::processInput(WireInputData $input)
$thisProcess the input from a submitted repeaters field
InputfieldRepeater::render()
stringRender the repeater items
InputfieldRepeater::renderAjaxNewItem()
stringRender a new item for ajax after 'add new' link clicked 
InputfieldRepeater::renderReady()
boolCalled before render() or renderValue() method by InputfieldWrapper, before Inputfield-specific CSS/JS files added 
InputfieldRepeater::renderRepeaterLabel(string $label, int $cnt, Page $page)
stringRender the repeater label
InputfieldRepeater::renderValue()
stringRender value (no inputs)
InputfieldRepeater::set(string $key, mixed $value)
Inputfield InputfieldRepeaterOverride the default set() to capture the required $page variable that the repeaters field lives on. 
InputfieldRepeater::setAttribute($key, $value)
InputfieldRepeater InputfieldSet attribute 

Properties

NameReturnSummaryDefault
InputfieldRepeater::accordionMode bool int When enabled, only one repeater item will be open at a time. false
InputfieldRepeater::familyFriendly bool int This setting makes the admin page editor treat item depth as a parent/child relationship when it comes to sorting/moving items. false
InputfieldRepeater::familyToggle bool int When enabled, opening (or closing) a repeater item also opens (or closes) the next items that are visually children of it, when combined with familyFriendly mode. false
InputfieldRepeater::loudControls bool int Always show controls regardless of hover? false
InputfieldRepeater::noScroll bool int Do not scroll to newly added items? false
InputfieldRepeater::repeaterDepth int Maximum allowed depth for repeater items or 0 to disable 0
InputfieldRepeater::repeaterMaxItems int Maximum repeater items or 0 for no max 0
InputfieldRepeater::repeaterMinItems int Minimum repeater items or 0 for no min 0
InputfieldRepeater::singleMode bool int Limit repeater to a single item, primarily for the extending FieldsetPage module. false

Additional methods and properties

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

API reference based on ProcessWire core version 3.0.251