code: public function endField()
      {
          $field = array_pop($this->_fields);
          if ($field instanceof ActiveField) {
              return $field->end();
          } else {
              throw new InvalidCallException('Mismatching endField() call.');
          }
      }
docs: Ends a form field.
  This method will return the closing tag of an active form field started by [[beginField()]].
  @return string the closing tag of the form field
  @throws InvalidCallException if this method is called without a prior [[beginField()]] call.