title: Getting value of hidden input field set-in using Javascript in Yii2
body: <p>I have a hidden input field in <strong>view</strong> in the <code>ActiveForm</code> </p>
  
  <pre><code>&lt;?php $form = ActiveForm::begin(); ?&gt;
  
      &lt;input type="file" id="i_file" name="uploadfile" value="" onchange="abc()"&gt; 
      &lt;?= $form-&gt;field($model, 'path')-&gt;hiddenInput() ?&gt;
      &lt;div class="form-group"&gt;
          &lt;?= Html::submitButton('submit', ['class' =&gt; 'btn btn-primary']) ?&gt;
      &lt;/div&gt;
  &lt;?php ActiveForm::end(); ?&gt;
  </code></pre>
  
  <p>I am setting it's value using Javascript as shown below:</p>
  
  <pre><code>&lt;script&gt;
  function abc(){
      var tmppath = URL.createObjectURL(event.target.files[0]);
      $("#taskreports-path").val(tmppath);
  
  alert(document.getElementById("taskreports-path").value);
  }   
  &lt;/script&gt;
  </code></pre>
  
  <p>Alert shows that the value is set into the field successfully. 
  Now I want the value of that input field in some php variable like:</p>
  
  <pre><code>$var path = //&lt;?= $form-&gt;field($model, 'path')-&gt;hiddenInput() ?&gt; this field's value
  </code></pre>
  
  <p>How can I do that in Yii2?</p>