code: protected function state()
      {
          $this->parts['{state}'] = $this->form->field($this->model, $this->model->getStatePropertyName())->widget(DepDrop::className(), [
              'options' => [
                  'id' => $this->fieldIds['state']
                  , 'placeholder' => Yii::t('jlorente/location', 'Select state')
                  , 'name' => $this->getSubmitModelName($this->model->getStatePropertyName())
              ]
              , 'data' => ArrayHelper::map(State::find()->where(['country_id' => $this->model->country_id])->orderBy(['name' => SORT_ASC])->all(), 'id', 'name')
              , 'pluginOptions' => [
                  'url' => Url::to(["/{$this->module->id}/state/list"])
                  , 'depends' => [$this->fieldIds['country']]
              ]
          ]);
      }
docs: Renders the region part.