title: yii2 how can you create a signup widget so in any view you can create user
body: <p>Using yii2 I have the default signup page however I'd like to render the signup form within another view this will be usefully not just for signup form but if you were wanting to render newsletter signup form in various places within an app.</p>
  
  <p>So i know how to render the form whether is the correct way or not I am not 100% sure.</p>
  
  <p>So I want to know how can I use the action that the signup page does which is in the sitecontroller file.</p>
  
  <p>Report Controller</p>
  
  <pre><code>namespace frontend\controllers;
  
  use frontend\models\SignupForm;
  use frontend\models\Report;
  ...
  public function actionIndex()
  {
  
      $published = true;
  
      $signupModel = new SignupForm();
  
      $searchModel = new ReportSearch();
      $dataProvider = $searchModel-&gt;search(Yii::$app-&gt;request-&gt;queryParams, $published);
  
      return $this-&gt;render('index', [
          'searchModel' =&gt; $searchModel,
          'signupModel' =&gt; $signupModel,
          'dataProvider' =&gt; $dataProvider,
      ]);
  }
  ...
  </code></pre>
  
  <p>In my report index view I have the below code which renders the form but doesn't register etc the page just refreshed (VIEW).</p>
  
  <pre><code>&lt;?= \Yii::$app-&gt;view-&gt;renderFile('@app/views/site/signup.php', ['model' =&gt; $signupModel]); ?&gt;
  </code></pre>