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

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,

David.
daveboyle99Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

smaccariCommented:
Could we see your code - as even hidden fields should be posted..
0
daveboyle99Author Commented:
<script language="javascript">
<!--
function captionjs(selObj){
   document.getElementById('captioncontent').style.display='block';
}
//-->
</script>

<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>
</select>
<br />
</div>
0
smaccariCommented:
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,..)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
daveboyle99Author Commented:
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.

D
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.