title: Input value hidden
body: <p>I have this input:</p>
  
  <pre><code>&lt;input id="tag1" type="text" name="tags" class="tags" value="@Model.list" /&gt;
  </code></pre>
  
  <p>and I want to get this input value in a hidden input, so I used this:</p>
  
  <pre><code>&lt;input type="hidden" name="tag" value="tags" /&gt;
  </code></pre>
  
  <p>Instead of getting the true value of the first input, I only get the string "tags"! Can you please  tell me how to obtain the true value of the first input in my hidden input? Thanks!</p>
  
  <p>EDIT: Actually it's a submit page, the user enters tags in the #tag1 and when he clicks on submit I want to send these tags to my controller, that's why I'm using the hidden input...
  My full code:</p>
  
  <pre><code>&lt;form&gt;
          &lt;p&gt;
          &lt;input id="tag1" type="text" name="tags" class="tags" value="@Model.list" onblur="setValue()"; /&gt;&lt;/p&gt;
          &lt;script&gt;
              $('#tag1').tagsInput({
                  // my parameters here
              });
  
          &lt;/script&gt;
  &lt;style&gt;
  #wrapper { 
  margin: 20px;    
  }
  
  
  &lt;/style&gt;
  
  
  
      &lt;p&gt;
          &lt;input type="submit" value="Create" /&gt;
          &lt;input type="hidden" name="taggg" id="tag2" /&gt;
          &lt;script type="text/javascript"&gt;
              function setValue() {
  
                  document.getElementById("tag2").value = document.getElementById("tag1").value;
              }
  
              window.onload = setValue;
          &lt;/script&gt;
  
  
      &lt;/p&gt;
  
  
      &lt;/form&gt;
  </code></pre>
  
  <p></p>