element['class'] ? ' class="' . (string) $this->element['class'] . '"' : ''; $attr .= ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : ''; $attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : ''; $attr .= $this->multiple ? ' multiple="multiple"' : ''; $attr .= $this->required ? ' required="required" aria-required="true"' : ''; // Initialize JavaScript field attributes. $attr .= $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : ''; // Iterate through the children and build an array of options. foreach ($this->element->children() as $option) { // Only add