title: How to copy a value from one form's file upload field to another form's text field?
body: <p>I have one page with two different forms on it. The first form allows a user to upload and email an image file, the second form generates a URL based on the user input.</p>
  
  <p>In order to add the image name to the URL, I need to have a field in the second form that copies the image name from the field in the first form (I'd rather not have to make the user browse for and select the image twice on one page). The best way I've found to copy data from one field to another across forms is this jQuery code: <a href="http://jsfiddle.net/nA37d/" rel="nofollow">http://jsfiddle.net/nA37d/</a>, but it doesn't work for my purposes. For example it works from text field to text field beautifully, but it doesn't work from file field to text field, or file field to file field.</p>
  
  <p>Is there a way to grab the value of the file field in form 1 and copy it to any kind of field in form 2? Here is my basic code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(function(){
      bindGroups();
  });
  
  var bindGroups = function() {
      // First copy values
      $("input[name='logotoo']").val($("input[name='logoname']").val());
  
      // Then bind fields
      $("input[name='logoname']").keyup(function() {
          $("input[name='logotoo']").val($(this).val());
      });
  };
  &lt;/script&gt;
  
  
  &lt;form action="#..." method="post" enctype="multipart/form-data"&gt;
  &lt;input type="file" name="logoname" value="1" /&gt;
  &lt;input type="submit" value="Upload" /&gt;&lt;/form&gt;
  
  
  &lt;form name="form2" action="/url/" method="get"&gt;
  &lt;label&gt;Logo Name&lt;/label&gt; &lt;input type="text" name="logotoo" /&gt;
  &lt;input type="submit" value="Generate URL" /&gt;&lt;/form&gt;
  </code></pre>
  
  <p>Thanks for any help you can give!</p>