We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Hidden layer containing form fields doesnt submit after being unhidden and filled out

daveboyle99 asked
Medium Priority
Last Modified: 2008-03-17
Hi All,

Hopefully a nice and simple one. I have a form with some hidden layers containing form fields, using css display:none .

These are then unhidden using some javascript that sets the properties of this layer to display:block .

All works well other than, when the form is submitted the data from these fields doesnt apper in the post data, and hence not in the email that the php script it submits to sends out.

best wishes,

Watch Question

Could we see your code - as even hidden fields should be posted..


<script language="javascript">
function captionjs(selObj){

<a href="javascript:captionjs()">Click here</a> to add additional drivers

<div id="captioncontent" style="display:none;">
<br />
<b>Additional Driver 1</b>
<br />
<br />
Title: <br />
<select name="Add_Driver_1_Title">                        
      <option value="0" selected>&gt;&gt; select</option>
      <option value="1">&gt;&gt; Mr</option>
      <option value="2">&gt;&gt; Mrs</option>
      <option value="3">&gt;&gt; Miss</option>
      <option value="4">&gt;&gt; Ms</option>
      <option value="5">&gt;&gt; Dr.</option>
<br />
This piece of code works for me if i put it in a form and submit it.
Maybe could you post more of your code (so as to see your form, the position of this element in it,..)

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


HI smaccari
you're right the code works fine it was my php that was at fault, fixed the problem now, thanks for your help.

Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.