Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9166361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:08:06+00:00 2026-06-17T15:08:06+00:00

I have one page with two different forms on it. The first form allows

  • 0

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.

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: http://jsfiddle.net/nA37d/, 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.

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:

<script type="text/javascript">
$(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());
    });
};
</script>


<form action="#..." method="post" enctype="multipart/form-data">
<input type="file" name="logoname" value="1" />
<input type="submit" value="Upload" /></form>


<form name="form2" action="/url/" method="get">
<label>Logo Name</label> <input type="text" name="logotoo" />
<input type="submit" value="Generate URL" /></form>

Thanks for any help you can give!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:08:08+00:00Added an answer on June 17, 2026 at 3:08 pm

    Just use change() handler for input type file, not keyup:

    http://jsfiddle.net/nA37d/169/

     $("input[name='a1']").change(function() {
            $("input[name='b1']").val($(this).val());
        });
    

    For input file to input file, i dont think its possible for security reason.

    BTW, this code should be refactorized.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two forms, and so two different submit buttons, for one page (page
I have two pages that inherit from one master page, First.aspx or second.aspx. Navigation
I have two forms on one page: a results form and a search form.
I have got two different forms on the same page. <form action= method=post onsubmit=ajax_send('<?print
I have two different forms on my home page: one for logins and one
Stupid question... I have two forms with two different functions on one page, my
I have two forms on one page and want to have the input boxes
I have a Django project that, on one page, has multiple forms (in different
I have two 100% overlapping panels with different contents on a form. The first
I want to have two separate forms on a single create page and one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.