• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • Last Modified:

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.
0
daveboyle99
Asked:
daveboyle99
  • 2
  • 2
1 Solution
 
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
 
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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now