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

Posted on 2006-04-21
Last Modified: 2012-06-27
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,

Question by:daveboyle99
    LVL 8

    Accepted Solution

    You have to use the existing protocol for this in HTML:
    <input type="hidden" name="yourname" value="yourvalue">

    You're trying to create a similar function through CSS and JS which is already in HTML :)

    Author Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
    SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
    In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
    In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now