/** * Get item class * * @param integer $index Item index * @param integer $length Items list length * @param \XLite\View\FormField\AFormField $field Current item * * @return string */ protected function getItemClass($index, $length, \XLite\View\FormField\AFormField $field) { $data = $this->getCountryStateSelectorFields(); foreach ($data as $countryField => $stateFields) { if ($stateFields[1] === $field->getName()) { $this->rowIndexDelta++; } } $index += $this->rowIndexDelta; $classes = parent::getItemClass($index, $length, $field); return $classes; }