#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    127
    Rep Power
    12

    Submitting form data from hidden div


    Hi,

    I'm trying to hide certain form field data before submitting it when all fields are filled.

    These 'hidden' fields are filled from a popup with the following code and works fine
    Code:
    ...
    parent.parent.document.getElementById("shipping:firstname").value = name; 
    ...
    After the fields are filled, i use this to hide the the formsection and show the data filled from the popup
    Code:
    ...
    parent.parent.document.getElementById("co-shipping-form").style.visibility = "hidden";
    ...
    Problem is that when i use the second part to hide the formsection, i get a submit error for the missing form field data. I thought hiding them would still submit the data.

    I tried with visibility=none and display=hide.


    Any smart suggestions?
    Last edited by Inpresif; October 20th, 2013 at 04:50 PM.
  2. #2
  3. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,188
    Rep Power
    184
    Try changing the opacity of the element(s); make the element(s) opacity "0.0"; I think that should work.

IMN logo majestic logo threadwatch logo seochat tools logo