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 8748165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:28:41+00:00 2026-06-13T12:28:41+00:00

Afternoon all, My question pertains to 2 chained forms, where values from the first

  • 0

Afternoon all, My question pertains to 2 chained forms, where values from the first form are validated and if OK the 2nd form is shown (and the input fields from the 1st are deactivated and the submit button hidden).

My question is: how can i get values from the first form be attached to the second form as hidden fields.

My code goes like this:

<form id="upfotos_dados" action="POST">
     <p class="desc_nome"><strong>O seu nome: </strong></p>
     <input type="text" id="fotos_nome" />

     <p class="desc_email"><strong>O seu email: </strong></p>
     <input type="text" id="fotos_email" />

     <p class="desc_especie"><strong>Fotografias da espécie: </strong></p>
     <input type="text" size="20" id="fotos_especie" value="Asplenium Cetarach" disabled />

     <input value="Confirmar" type="submit" name="submit" class="button submit_dados" />
     <div class="clearfix"></div>
</form>

<form id="upload_imagens" action="javascript:$('#file_upload').uploadifive('upload')">
  <div id="queue"></div>
  <input id="file_upload" name="file_upload" type="file" multiple>
  <input value="Enviar Fotografias" type="submit" name="submit" class="enviafotos-button" /> 
</form>

And the jQuery:

    $(document).ready(function(){
        $("#upload_imagens").hide();    
    });

    $('.submit_dados').live("click",function(){

        if($('#fotos_email').val() == ''){ $('#fotos_email').parent().find('.desc_email').append("<span style='color:#A00'>Campo obrigatório.</span>"); return false; }
        else if(!IsEmail($('#fotos_email').val()) ){ $('#fotos_email').parent().find('.desc_email').append("<span style='color:#A00'>Email incorrecto.</span>"); return false; }
        if($('#fotos_nome').val() == ''){ $('#fotos_nome').parent().find('.desc_nome').append("<span style='color:#A00'>Campo obrigatório.</span>"); return false; }
        if($('#fotos_especie').val() == ''){ $('#fotos_especie').parent().find('.desc_especie').append("<span style='color:#A00'>Campo obrigatório.</span>"); return false; }

        if($('#fotos_email').val() != '' && IsEmail($('#fotos_email').val()) && $('#fotos_nome').val() != '' && $('#fotos_especie').val() != ''){
            $("#upload_dados").hide();
            $("#upload_imagens").show();
            return false;
        }
    });  

Some things are still work in progress, like simultaneous validation of the fields that unfortunatelly I haven’t manage to do it right yet.

  • 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-13T12:28:42+00:00Added an answer on June 13, 2026 at 12:28 pm

    While I don’t know the reason you have to have two separate forms instead of one, one possible approach is looping through all inputs of first form and append them as children to the second form.. Something like this:

    $('#form1 input, #form1 select').each(function(index, element){
      $(#form2).append('<input type="hidden" name="'+$(element).attr('id')+'" value="'+$(element).val()+'">');
    });
    

    Something like that, maybe that is what you’re looking for?

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

Sidebar

Related Questions

Afternoon all, A very quick question... a friend has set up a form for
Afternoon All, I have a web form that i wish my user to fill
Good Afternoon all , I have downloaded data from a web service and im
Afternoon all. Another hour, another question! I have the following bit of jquery up
I have a question that's been bugging me all afternoon: I'm making a guitar
Good afternoon everybody, first of all I hope this is the correct place to
Good afternoon all, I am building a function that takes a string as input,
Afternoon all, I am trying to write a script that will extract the first
Afternoon all, In need of some technical advice from the masters... I know the
Afternoon All, I have a dropdown list which extracts data from my SQL database

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.