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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:23:58+00:00 2026-06-02T02:23:58+00:00

Could anyone please give me an example of how to create a multple step

  • 0

Could anyone please give me an example of how to create a multple step form where each stage is submitted by onClick then using hidden inputs or variables to store the values from previous pages?

For example:

Step 1…

<input type="radio" name="group1" value="yes" onclick="this.form.submit()" />

<input type="radio" name="group1" value="no" onclick="this.form.submit()" />

Step 2…

<input type="radio" name="group2" value="100" onclick="this.form.submit()" />

<input type="radio" name="group2" value="200" onclick="this.form.submit()" />

<input type="radio" name="group2" value="300" onclick="this.form.submit()" />


<!-- previous input -->
<input type="hidden" name="group1" value="200" />

Thanks!

  • 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-02T02:24:00+00:00Added an answer on June 2, 2026 at 2:24 am

    So as i said in the comment, create only one form: (code is highly unformatted and serves only for comprehension purposes)

    <form>
         <input class='step1input'/>
         <input class='step1input'/>
          <input class='step2input'/>
         <input class='step2input'/>
         ...
     </form>
    

    at the first step hide the inputs that dont belong there (step2input classes)

    at second step, hide the other inputs (step1input classes)

    etc…

    at the end of the last step you submit the ENTIRE form

    EDIT: what you’re doing is fine, only, instead of submitting the form, you just hide the elements. use a jquery or javascript function like this:

     function goToNextStep(currentStep){
        if (currentStep==1) {
           $('input[name='group1']').hide();
           $('input[name='group2']').show();
        }else if (currentStep==2){
             ...
        }
        ...
        else if (currentStep==lastStep){
            document.form.submit();
        }
     }
    

    Step 1…

    <input type="radio" name="group1" value="yes" onclick="goToNextStep(1)" />
    
    <input type="radio" name="group1" value="no" onclick="goToNextStep(1)" />
    

    Step 2…

    <input type="radio" name="group2" value="100" onclick="goToNextStep(2)" />
    
    <input type="radio" name="group2" value="200" onclick="goToNextStep(2)" />
    
    <input type="radio" name="group2" value="300" onclick="goToNextStep(2)" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could anyone please give me an example in this? I have found many but
Could anyone please give me a short working example of a C# class which
Could anyone please give a sample or any link that describes how to spawn
Could anyone please help me using C# Api in Z3. I have no idea
Could anyone give me examples of how to use parameterized queries with MySQL/PHP please?
Could anyone please give me a brief full list of containers in Java? Some
Could anyone please give me a heads-up on how to implement my own row
Could anyone please give a regular expression for jQuery validation on a home phone
Could anyone please give me a quick overview/point me to documentation of a way
could anyone please clarify the meaning of line generalizes the tag object's storage of

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.