InputfieldWrapper::getByAttr()

Given an attribute name and value, return the first matching Inputfield or null if not found

This traverses all children recursively to find the requested Inputfield.

Available since version 3.0.196.

Usage

$inputfield = $inputfieldWrapper->getByAttr(string $attrName, string $attrValue);

Arguments

NameType(s)Description
$attrNamestring

Attribute to match, such as 'id', 'name', 'value', etc.

$attrValuestring

Attribute value to match

Return value


InputfieldWrapper methods and properties

API reference based on ProcessWire core version 3.0.251