title: Showing a different active field when some answer is selected, Yii2
body: <p>I have an active form with a radioList. When the option 'other' is selected, I want to show a hidden field, using jquery.
  For some reason, what i tried did not work.
  My form:</p>
  
  <pre><code>&lt;?= $form-&gt;field($model, 'program_motivation', [
          'inputOptions' =&gt;[
              'id' =&gt; 'motiv'
          ]
      ])-&gt;radioList(array('1'=&gt;'money','2'=&gt;'content','3'=&gt;'other')); ?&gt;
  
  
   &lt;?= $form-&gt;field($model, 'otherMotiv',['inputOptions' =&gt; [
          'id' =&gt; 'otherM'
  ]]))-&gt;hiddenInput()-&gt;textInput(['maxlength' =&gt; 10])-&gt;label('insert other option')?&gt;
  </code></pre>
  
  <p>My javascript:</p>
  
  <pre><code>var program = $('#motiv').val();
  if (program == 'other'){
      $('#otherM').show();
  }
  </code></pre>