Yii2 Redirect on same page with data entered by user
<p>I'm using Yii2-advanced-app. I've taken some actions on pop-up forms like this - <a href="https://i.stack.imgur.com/ub5x7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ub5x7.png" alt="Pop-up action"></a></p>

<p>When we click on 'Create' button on pop-up, it creates some record &amp; redirect us to the same page i.e. localhost/abcd/backend/web/index.php?r=xyz/create.
Here is the code I wrote for this - </p>

<pre><code>public function actionCreateitem()
{
  $model = new Items();

  if ($model-&gt;load(Yii::$app-&gt;request-&gt;post()) &amp;&amp; $model-&gt;save()) {
    return $this-&gt;redirect(['create', 'id' =&gt; $_SESSION['ro_id']]);
  } else {
    return $this-&gt;renderAjax('itemform', [
      'model' =&gt; $model,
      ]);
  }
}
</code></pre>

<p>Here I redirected the page on create form/page again. It's okay. But when user fills the whole form &amp; then he wants to 'add item', he clicks on add button &amp; create it on pop-up. But after submitting the pop-up form, all the fields on create page gets cleared which he recently filled(because we redirect it). <strong><em>I need the scenario where the page should not be refreshed/redirected after submitting the pop-up, it should remain on the same page, So that the data entered by the user will remain safe on the page.</em></strong>
So, after creating an item, he will get the create page something like this -
<a href="https://i.stack.imgur.com/uIlI3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uIlI3.png" alt="filled create form"></a></p>