title: Yii2 Doesn't Get the Value of Disabled Dropdown List or Textfield
body: <p>I want to disable certain textfields and dropdown lists to prevent user from changing its values. But whenever I try to, it doesn't collect/get the data of that specific disabled textfield or dropdown list. </p>
  
  <p>Here's my view where I display my dropdown lists. It's inside a <code>for</code> loop:</p>
  
  <pre><code>echo $form-&gt;field($model1[$i], 'earning_item_id')-&gt;widget(Select2::classname(), [
      'data' =&gt; $earningslistData,
      'options' =&gt; ['placeholder' =&gt; '', 'prevOptionID' =&gt; $model1[$i]-&gt;earning_item_id, 'prevOptionName' =&gt; $earningslistData[$model1[$i]-&gt;earning_item_id], 
                      "name" =&gt; "EarningDetails[".$i."][earning_item_id]", "row_count1" =&gt; $i],
      //'disabled' =&gt; true,
      'pluginOptions' =&gt; [
          'allowClear' =&gt; true,
          'label' =&gt; false
      ]
  ]);
  </code></pre>
  
  <p>Here's how it looks like without disabling them:</p>
  
  <p><img src="https://i.stack.imgur.com/Egdhn.png" alt="enter image description here"></p>
  
  <p>Then, when I save it, it looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/HpKqQ.png" alt="enter image description here"></p>
  
  <p>But, when I disable the dropdown lists, it will give me this:</p>
  
  <p><img src="https://i.stack.imgur.com/NG3pH.png" alt="enter image description here"></p>
  
  <p>I think the <strong>Full Name</strong> comes from my model but I don't know why:</p>
  
  <pre><code>public function getFullName() 
  {
      return $this-&gt;user ? $this-&gt;user-&gt;fname . ' ' . $this-&gt;user-&gt;lname : 'Full Name';
  }
  </code></pre>
  
  <p>It goes the same when I disable a textfield:</p>
  
  <pre><code>echo $form-&gt;field($model, 'user_id')-&gt;widget(Select2::classname(), [
      'data' =&gt; $listData,
      'options' =&gt; ['placeholder' =&gt; 'Select a Staff'],
      'disabled' =&gt; true,
      'pluginOptions' =&gt; [
          'allowClear' =&gt; true,
      ],
  ])-&gt;label('Employee Name');
  </code></pre>
  
  <p>I am using Kartik widgets for my form fields. 
  Is there a way to fix this? Please tell me how.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Thanks to the commenters below I found out the difference between <code>disabled</code> and <code>readonly</code>. Since it's a dropdown list, here's what I did: </p>
  
  <pre><code>echo $form-&gt;field($model, 'user_id')-&gt;widget(Select2::classname(), [
      'data' =&gt; $listData,
      'options' =&gt; ['placeholder' =&gt; 'Select a Staff', ],
      'pluginOptions' =&gt; [
          'allowClear' =&gt; true,
      ],
  ])-&gt;label('Employee Name');
  
  echo $form-&gt;field($model, 'user_id')-&gt;widget(Select2::classname(), [
      'data' =&gt; $listData,
      'options' =&gt; ['placeholder' =&gt; 'Select a Staff', 'style' =&gt; 'display:none'],
      'pluginOptions' =&gt; [
          'allowClear' =&gt; true,
      ],
  ])-&gt;label('');
  </code></pre>