# Solved: Hide HTML form?



## Zenoxio

If I have a form, how can I hide it? I don't want to disable it as PHP needs to access the variables, but it needs to be hidden at all times.


----------



## JimmySeal

You can add style="display:none" to the top element.


----------



## namenotfound

You can also use so it doesn't show up on the page, only in the source.
Using what is suggested above will only hide it as long as CSS is enabled. Someone could easily disable CSS to reveal it on your site.


----------



## echicken

You could also put it in a div and use visibility="hidden".


----------



## Eriksrocks

namenotfound said:


> You can also use so it doesn't show up on the page, only in the source.
> Using what is suggested above will only hide it as long as CSS is enabled. Someone could easily disable CSS to reveal it on your site.


PHP won't be able to access the variables in that case, because technically the form doesn't exist on the page. 

Have you considered using a hidden input field?
http://www.tizag.com/htmlT/htmlhidden.php

That's what those are meant for.


----------



## mattvot

how about grabbing the variables from the form in an external file?


----------



## tex0gen

Why do you want a form that is invisible? why have a form in the first place?

There is a variable in the html of the form that allows it to be hidden. ill get back to you in about 30-40 mins.


----------



## Eriksrocks

tex0gen said:


> There is a variable in the html of the form that allows it to be hidden. ill get back to you in about 30-40 mins.


Yes, that's what I already posted.


----------



## Zenoxio

JimmySeal said:


> You can add style="display:none" to the top element.


That worked, just had to add it to each element.


----------



## tex0gen

Thats what i mean. Add that to your html form.


----------

