title: Yii2 dropDownList -Cannot insert data into database
body: <p>Hi I add the dropdownlist to my _form before that i can still insert and submit data into database , but when I replaced my input with dropdownlist. everything is ok but when I click submit button no error displayed but no data inserted to database.How Can I fix this? Help me pleasee guys.. Thank you soo much.. in advance..
  <a href="https://i.stack.imgur.com/gIJwa.png" rel="nofollow noreferrer">This is the code</a></p>
  
  <p>This is my Tblregion model</p>
  
  <pre><code>&lt;?php
  
  namespace backend\models;
  
  use Yii;
  
  /**
   * This is the model class for table "tbl_region".
   *
  
   */
  class TblRegion extends \yii\db\ActiveRecord
  {
      /**
       * @inheritdoc
       */
      public static function tableName()
      {
          return 'tbl_region';
      }
  
      /**
       * @inheritdoc
       */
      public function rules()
      {
          return [
              [['nregion_id'], 'required'],
              [['nregion_id'], 'integer'],
              [['cregion_procode', 'cregion_proaddress'], 'string', 'max' =&gt; 40],
              [['cregion_proname', 'cregion_prohead', 'cregion_tel', 'cregion_position', 'cregion_name'], 'string', 'max' =&gt; 50],
          ];
      }
  
      /**
       * @inheritdoc
       */
      public function attributeLabels()
      {
          return [
              'cregion_procode' =&gt; 'Cregion Procode',
              'cregion_proname' =&gt; 'Cregion Proname',
              'cregion_prohead' =&gt; 'Cregion Prohead',
              'cregion_proaddress' =&gt; 'Cregion Proaddress',
              'cregion_tel' =&gt; 'Cregion Tel',
              'cregion_position' =&gt; 'Cregion Position',
              'cregion_name' =&gt; 'Cregion Name',
              'nregion_id' =&gt; 'Region',
          ];
      }
  
      /**
       * @return \yii\db\ActiveQuery
       */
      public function getTblProvinces()
      {
          return $this-&gt;hasMany(TblProvince::className(), ['nregion_id' =&gt; 'nregion_id']);
      }
  }
  
  
  &lt;?php
  
  namespace backend\models;
  
  use Yii;
  
  /**
   * This is the model class for table "tbl_province".
   */
  class TblProvince extends \yii\db\ActiveRecord
  {
      /**
       * @inheritdoc
       */
      public static function tableName()
      {
          return 'tbl_province';
      }
  
      /**
       * @inheritdoc
       */
      public function rules()
      {
          return [
              [['nregion_id', 'cprovince_name'], 'required'],
              [['nregion_id'], 'integer'],
              [['cprovince_name'], 'string', 'max' =&gt; 50],
              [['cprovince_areacode'], 'string', 'max' =&gt; 10],
              [['cprovince_code'], 'string', 'max' =&gt; 40],
              [['nregion_id'], 'exist', 'skipOnError' =&gt; true, 'targetClass' =&gt; TblRegion::className(), 'targetAttribute' =&gt; ['nregion_id' =&gt; 'nregion_id']],
          ];
      }
  
      /**
       * @inheritdoc
       */
      public function attributeLabels()
      {
          return [   
              'nregion_id' =&gt; 'Region Name',
              'cprovince_name' =&gt; 'Province Name',
              'cprovince_areacode' =&gt; 'Province Areacode',
              'cprovince_code' =&gt; 'Province Code',
          ];
      }
  
      /**
       * @return \yii\db\ActiveQuery
       */
      public function getTblCities()
      {
          return $this-&gt;hasMany(TblCity::className(), ['cprovince_name' =&gt; 'cprovince_name']);
      }
  
      /**
       * @return \yii\db\ActiveQuery
       */
      public function getTblFacilities()
      {
          return $this-&gt;hasMany(TblFacility::className(), ['cprovince_name' =&gt; 'cprovince_name']);
      }
  
      /**
       * @return \yii\db\ActiveQuery
       */
      public function getregion()
      {
          return $this-&gt;hasOne(TblRegion::className(), ['nregion_id' =&gt; 'nregion_id']);
      }
  }
  </code></pre>