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

  • Home
  • SEARCH
  • 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 7577091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:05:49+00:00 2026-05-30T17:05:49+00:00

I have a HTML form which when submitted sends an email with all the

  • 0

I have a HTML form which when submitted sends an email with all the questions and answers using PHP.

I need to break the form down as it’s too long. I need only one submit button and for the form to load only once. This obviously means that I need to use JavaScript show/hides.

I’ve tried using many different types but I can’t get them to work properly with my form. It is quite large and seems to be very complicated to get to work with show/hide 🙁

I’ve used show/hide divs before but not tables.

Anyone have anything that can help?

What I’d like is,

  • A next button that takes you to another section of the form.
  • Whilst on the next section you can return back to the previous section or go on to another section again.
  • The last section to contain previous or submit.

Thanks in advance.

  • 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-05-30T17:05:50+00:00Added an answer on May 30, 2026 at 5:05 pm

    That’s quite a common request. Here is one way

    • Break your form in pages using divs with easy to manage ids and only the first one visible

    .

    <form action=".." ..>
    <!-- the first page has style set to be visible -->
    <div id="formpage_1" style="visibility: visible; display: block; .."> 
      <label for="..">..</label>
      <input type=".." ..>
      ..
      <!-- NEXT button -->
      <input type="button" value="next" onclick="pagechange(1,2);">
    </div>
    <!-- the 2nd and following pages have style set to be invisible -->
    <div id="formpage_2"  style="visibility: hidden; display: none; ..">
      <label for="..">..</label>
      <input type=".." ..>
      ..
      <!-- PREVIOUS and NEXT buttons -->
      <input type="button" value="back" onclick="pagechange(2,1);">
      <input type="button" value="next" onclick="pagechange(2,3);">
    </div>
    ...
    <div id="formpage_10"  style="visibility: hidden; display: none; ..">
      <label for="..">..</label>
      <input type=".." ..>
      ..
      <!-- PREVIOUS and SUBMIT buttons -->
      <input type="button" value="back" onclick="pagechange(10,9);">
      <input type="submit" value="Submit">
    </div>
    
    • Use a simple JS function to switch between the pages

    .

    function pagechange(frompage, topage) {
      var page=document.getElementById('formpage_'+frompage);
      if (!page) return false;
      page.style.visibility='hidden';
      page.style.display='none';
    
      page=document.getElementById('formpage_'+topage);
      if (!page) return false;
      page.style.display='block';
      page.style.visibility='visible';
    
      return true;
    }
    

    Edit

    If you want to use a table layout, break the for into more tables (one for each page) and give the ids to the tables instead of the divs

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

Sidebar

Related Questions

I have a post html form, and the action is index.php, which is the
I have an online gateway which requires an HTML form to be submitted with
I have a form which am using html5 to validate for email and required
I have a form which submits user first and last name using POST signin.html
I have a form in HTML which when submitted makes a call to the
I have a html form which have a select list box from which you
I have this html form which has options: <tr> <td width=30 height=35><font size=3>*List:</td> <td
I have a an HTML form which contains the YAHOO rich text editor on
I have an HTML form generated by JSF which maps an input element to
I have a html form for uploading a file, which is as follows: $uploadhtml

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.