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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:46:32+00:00 2026-06-11T12:46:32+00:00

For a basic HTML form, I would like to seperate the form into three

  • 0

For a basic HTML form, I would like to seperate the form into three tabs, each tab will contain certain fields, and when submit the form I wish all data in the three forms will be able to submit.

So I have a menu created by <ul> and <li>

<ul class="subnav">
    <li class="subnav0 current"><a href="javascript:showTab('tab1');">Tab1</a></li>
    <li class="subnav1"><a href="javascript:showTab('tab2');">Tab2</a></li>
    <li class="lastItem subnav2"><a href="javascript:showTab('tab3');">Tab3</a></li>
</ul>

and below this menu, I have three divs that represent each of the tab:

<div class="tab1"></div>
<div class="tab2 displayNone"></div>
<div class="tab3 displayNone"></div>

The input controls elements will be put into each of the tab divs. And the javascript in the menu nav bar will control which tab to display by call show() & hide() method of each div. (Using jQuery).

Now my problem is:

1) I want to be able to submit the whole form (all controls within three divs). However, html forms won’t submit input controls within a displayNone div, which means I will only be able to submit the data within the tab which I am currently viewing but not the other two tabs.

2) I also want to do some javascript functions on hide elements when initialize the form in tab2 or tab3. However, since they are display:none, the javascript will not have any effect.

So is there any way that I can somehow hide the div, but also be able to submit the form and do any javascript operation on it?

  • 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-11T12:46:33+00:00Added an answer on June 11, 2026 at 12:46 pm

    According to the W3C display:none controls may still be sent to the server, as they are considered successsful controls

    17.13.2 Successful controls

    A successful control is “valid” for submission. Every successful
    control has its control name paired with its current value as part of
    the submitted form data set. A successful control must be defined
    within a FORM element and must have a control name.

    However:

    • Controls that are disabled cannot be successful.
    • If a form contains more than one submit button, only the activated
      submit button is successful.
    • All “on” checkboxes may be
      successful.
    • For radio buttons that share the same value of
      the name attribute, only the “on” radio button may be
      successful.
    • For menus, the control name is provided by a
      SELECT element and values are provided by OPTION elements. Only
      selected options may be successful.
    • When no options are
      selected, the control is not successful and neither the name nor
      any values are submitted to the server when the form is
      submitted.
    • The current value of a file select is a list of
      one or more file names. Upon submission of the form, the contents
      of each file are submitted with the rest of the form data. The file
      contents are packaged according to the form’s content
      type.
    • The current value of an object control is determined by
      the object’s implementation.

    If a control doesn’t have a current value

    when the form is submitted, user agents are not required to treat it
    as a successful control.

    Furthermore, user agents should not consider the following controls
    successful:

    Reset buttons. OBJECT elements whose declare attribute has been set.
    Hidden controls and controls that are not rendered because of style
    sheet settings may still be successful.

    For example:

    <FORM action="..." method="post">
    <P>
    <INPUT type="password" style="display:none"  
              name="invisible-password"
              value="mypassword">
    </FORM>
    

    will still cause a value to be paired with the name
    “invisible-password” and submitted with the form.

    In any case if that doesnt seem to be working why not try jQuery serialize() or serializeArray() on each form and concatenate the values and ajax them back to the server.

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

Sidebar

Related Questions

I have just a basic html form within index.php which contains two text fields:
Here's a basic view of what my html looks like: <form> <div id=part1> //
When editing a basic User model in Rails from the edit.html.erb form, I would
I would like to send data to a html form from MS Access. I
I have a basic form that I would like to submit using ajax, without
I've got a basic HTML/JavaScript contact form that HostGator provided. It works pretty well...if
This is probably a basic html/css question... I have a simple one-button form that
So I am trying to do a basic upload via an HTML form and
I have the basic html form echoed through php: <html> <body> <?php if (isset($_GET[pk]))
Hey all, I have a basic HTML contact form that goes to a .php

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.