title: Yii 2 - radioList Template
body: <p>I want to add template to radioList in yii2, which I tried, but I am unable to get the proper o/p.</p>
  
  <p>The HTML is</p>
  
  <pre><code>&lt;div class="input-wrap"&gt;
      &lt;label class="gender-head"&gt;Gender&lt;/label&gt;
      &lt;label class="signup-radio"&gt;
          &lt;input type="radio" name="signup-gender" id="signupMale" checked  tabindex="3" /&gt;
          &lt;i&gt;&lt;/i&gt;
          &lt;span&gt;Male&lt;/span&gt;
      &lt;/label&gt;
      &lt;label class="signup-radio"&gt;
          &lt;input type="radio" name="signup-gender" id="signupFemale" tabindex="3" /&gt;
          &lt;i&gt;&lt;/i&gt;
          &lt;span&gt;Female&lt;/span&gt;
      &lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The o/p should look like this</p>
  
  <p><img src="https://i.stack.imgur.com/vKWEi.png" alt="enter image description here"></p>
  
  <p>The Yii2 code which I tried is...</p>
  
  <pre><code>&lt;div class="input-wrap"&gt;
      &lt;div class="clearfix"&gt;
          &lt;?= $form-&gt;field($model, 'gender', ['radioTemplate' =&gt; '&lt;label class="gender-head"&gt;{label}&lt;/label&gt;&lt;label class="signup-radio"&gt;{input}&lt;/label&gt;'])-&gt;inline()-&gt;radioList([1 =&gt; 'Male', 0 =&gt; 'Female'], ['separator' =&gt; '', 'tabindex' =&gt; 3]); ?&gt;
       &lt;/div&gt;
       &lt;div class="help-block"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I have searched a lot on the template but did not get any proper response.</p>