yii2 - model load function does not set some model attributes
<p>I'm working on a PHP Yii2 application. I have a strange problem with yii2 <code>yii\base\Model.load</code> function. Here is my problem:</p>

<p>I have a form model called <code>PaymentIncreaseBalanceForm</code> like below:</p>

<pre><code>class PaymentIncreaseBalanceForm extends yii\base\Model {
     public $amount;
     public $receiptNumber;
     public $description;
     ...
}
</code></pre>

<p>Here is part of my view file:</p>

<pre><code>&lt;?= $form-&gt;field($model, 'amount')-&gt;textInput(['maxlength' =&gt; true]) ?&gt;

&lt;?= $form-&gt;field($model, 'receiptNumber')-&gt;textInput(['maxlength' =&gt; true]) ?&gt;

&lt;?= $form-&gt;field($model, 'description')-&gt;textarea(['rows' =&gt; 6]) ?&gt;
</code></pre>

<p>And this is my controller action:</p>

<pre><code> public function actionIncreaseBalance()
 {
      $modelForm = new PaymentIncreaseBalanceForm();
      if ($modelForm-&gt;load(Yii::$app-&gt;request-&gt;post()))
      {
              //some logic
      }

       return $this-&gt;render('increase-balance', [
                'model' =&gt; $modelForm,
      ]);
  }
</code></pre>

<p>After submitting the form, I logged <code>Yii::$app-&gt;request-&gt;post()</code> with <code>die()</code> and all three parameters <code>amount</code>, <code>receiptNumber</code>, <code>description</code> exist in the post with their right values(every thing is right). But after calling <code>$modelForm-&gt;load</code> function, this is my model attributes:</p>

<pre><code>$amount =&gt; 1000,
$receiptNumber =&gt; 887412141,
$description =&gt; NULL,
</code></pre>

<p><code>$description</code> always is NULL! I don't know what is the problem with this field. Is there any problem with my code?</p>