title: Yii2 different form fields on create and on update scenario
body: <p>In my Model I have created different scenarios. I have one form which is rendered bu both create and update method. The form fields are as follows</p>
  
  <p><strong>Form.php</strong></p>
  
  <pre><code> &lt;?php $form = ActiveForm::begin(); ?&gt;
  
   &lt;?= $form-&gt;errorSummary($model, $options = ['header'=&gt;'', 'class'=&gt;'pull-left errorDiv']); ?&gt;
  
              &lt;?= $form-&gt;field($model, 'user_fname')-&gt;textInput(['class'=&gt;'form-control']);?&gt;
              &lt;?= $form-&gt;field($model, 'user_lname')-&gt;textInput(['class'=&gt;'form-control']); ?&gt;
              &lt;?= $form-&gt;field($model,'user_email')-&gt;textInput(['class'=&gt;'form-control']); ?&gt;
              &lt;?= $form-&gt;field($model, 'user_password_hash')-&gt;passwordInput([]); ?&gt;
              &lt;?= $form-&gt;field($model, 'user_password_hash_repeat')-&gt;passwordInput(['class'=&gt;'form-control']); ?&gt;
              &lt;?php  $items = ArrayHelper::map(SimAuthAssignment::find()-&gt;all(),'item_name' ,'item_name');?&gt;
              &lt;?= $form-&gt;field($mode, 'item_name')-&gt;dropDownList($items,[]);?&gt;
  
  &lt;div class="form-group"&gt;
      &lt;?= Html::submitButton($model-&gt;isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' =&gt; $model-&gt;isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?&gt;
  &lt;/div&gt;
  
  &lt;?php ActiveForm::end(); ?&gt;
  </code></pre>
  
  <p>On using update scenario I want only my email, firstname and last name to be rendered from the form.</p>
  
  <pre><code> const SCENARIO_REGISTER = 'signup';
  const SCENARIO_CREATE = 'create';
  const SCENARIO_UPDATE = 'update';
  
   public function scenarios()
  {
      return [
  
            self::SCENARIO_REGISTER =&gt; ['user_email', 'user_password_hash', 'user_fname', 'user_lname', 'agree','!user_password_hash_repeat','required'],
            self::SCENARIO_CREATE =&gt; ['user_email', 'user_password_hash', 'user_fname', 'user_lname','!user_password_hash_repeat','required'],
            self::SCENARIO_UPDATE =&gt; ['user_email', 'user_fname', 'user_lname', 'required'],
      ];
  }
  
  public static function tableName()
  {
      return 'sim_user';
  }
  </code></pre>
  
  <p>And in my controller update method I am using scenario as below code.</p>
  
  <pre><code> public function actionUpdate($id)
      {
          $model = $this-&gt;findModel($id);
          $model-&gt;scenario = SimUser::SCENARIO_UPDATE;
         // var_dump($model-&gt;scenario); exit();
          $mode = \app\modules\auth\models\SimAuthAssignment::find()-&gt;where(['user_id' =&gt; $id])-&gt;one();
  
  
          if ($model-&gt;load(Yii::$app-&gt;request-&gt;post())&amp;&amp; $mode-&gt;load(Yii::$app-&gt;request-&gt;post())) {
              $model-&gt;save();
  
              return $this-&gt;redirect(['view', 'id' =&gt; $model-&gt;user_id]);
          } else {
              return $this-&gt;renderAjax('update', [
                  'model' =&gt; $model,
                  'mode' =&gt; $mode,
              ]);
          }
      }
  </code></pre>
  
  <p>I want to get only the email, firstname and lastname form fields to be rendered in the form when I edit. I want to ignore the others fields in the form when I edit. What am I missing here? Thanks!!</p>