title: Dropdownlist Field Form not saved in DB
body: <p>I'm new in <code>Yii2 Framework</code>. I have a problem, I'm trying to make register form but after register, the role is not saved to database. 
  This is the form.</p>
  
  <p><img src="https://i.stack.imgur.com/xqfdy.png" alt="Form visualization"></p>
  
  <p>This is my table for role:</p>
  
  <p><img src="https://i.stack.imgur.com/fpH33.png" alt="DB-Table"></p>
  
  <p>This is the view code, register.php:</p>
  
  <pre><code>&lt;h2&gt;Sign Up : &lt;/h2&gt;
                  &lt;div class="user-form"&gt;
                      &lt;?php $form = ActiveForm::begin(); ?&gt;
                      &lt;?= $form-&gt;field($model, 'username')-&gt;textInput(['maxlength' =&gt; true]) ?&gt;
  
                      &lt;?= $form-&gt;field($model, 'email')-&gt;textInput(['maxlength' =&gt; true]) ?&gt;
  
                      &lt;?= $form-&gt;field($model, 'password')-&gt;passwordInput(['maxlength' =&gt; true]) ?&gt;
  
                      &lt;?= $form-&gt;field($model, 'user_kind')-&gt;dropdownList(
                          ArrayHelper::map(CtKindUser::find()-&gt;all(), 'id','kindUser'), [
                              'prompt' =&gt; 'Choose Category',]); ?&gt;
  
                      &lt;div class="form-group"&gt;
                          &lt;?= Html::submitButton($model-&gt;isNewRecord ? 'Create' : 'Update', ['class' =&gt; $model-&gt;isNewRecord ? 'btn btn-primary' : 'btn btn-primary']) ?&gt;
                      &lt;/div&gt;
  
                      &lt;?php ActiveForm::end(); ?&gt;
  </code></pre>
  
  <p>This is the controller. </p>
  
  <pre><code>public function actionRegister()
  {
      $model = new User();
      $modelLogin = new LoginForm();
  
      if($modelLogin-&gt;load(Yii::$app-&gt;request-&gt;post())&amp;&amp; $modelLogin-&gt;login()){
          return $this-&gt;goHome();
      }
      if ($model-&gt;load(Yii::$app-&gt;request-&gt;post())) {
          $model-&gt;id = $model-&gt;generateRandomString();
          $hash = Yii::$app-&gt;getSecurity()-&gt;generatePasswordHash($model-&gt;password);
          $model-&gt;password = $hash;
          $model-&gt;activated = 1;
          $model-&gt;createdAt = date("Y-m-d").' '.date("h:i:s a");
          $model-&gt;user_kind = ''; 
  
          $model-&gt;save();
          return $this-&gt;redirect(['/site/index']);
  
          // return $this-&gt;redirect(['/site/index']);
      } else {
          return $this-&gt;render('register', [
              'model' =&gt; $model,
              'modelLogin' =&gt; $modelLogin,
          ]);
      }
  </code></pre>
  
  <p>And this is the models.</p>
  
  <pre><code>public function rules()
      {
          return [
              [['username', 'email', 'password'], 'required'],
              [['activated'], 'integer'],
              [['profile_name'], 'string', 'max' =&gt; 250],
              [['id', 'user_kind'], 'string', 'max' =&gt; 35],
              [['username', 'email'], 'string', 'max' =&gt; 50],
              [['createdAt', 'updatedAt'], 'string', 'max' =&gt; 30],
              [['user_kind'], 'string', 'max' =&gt; 45],
              [['user_kind'], 'exist', 'skipOnError' =&gt; true, 'targetClass' =&gt; CtKindUser::className(), 'targetAttribute' =&gt; ['user_kind' =&gt; 'id']],
          ];
      }
  
      /**
      * @inheritdoc
      */
      public function attributeLabels()
      {
          return [
          'id' =&gt; 'ID',
          'username' =&gt; 'Username',
          'profile_name' =&gt; '',
          'email' =&gt; 'Email',
          'password' =&gt; 'Password',
          'category' =&gt; 'Category',
          'createdAt' =&gt; 'Created At',
          'updatedAt' =&gt; 'Updated At',
          'activated' =&gt; 'Activated',
          'user_kind' =&gt; 'Jenis Pengguna',
          ];
      }
  
      public function getUserKind()
  {
      return $this-&gt;hasOne(CtKindUser::className(), ['id' =&gt; 'user_kind']);
  }
  </code></pre>
  
  <p>Someone, can help me. What is actually the problem? 
  Thanks.</p>