Hidden Field

What is a Hidden Field?

Hidden fields are used to pass information in the backgrond from web pages to web servers. The easiest way to understand what a hidden field is is to consider a case where you would use one. First of all, you need to know that fields are places where you enter information into forms. For example, on the side of this posting is a form where you can enter your name email address to receive an internet marketing training course. Each box is a field so there is a field called “Name” and a field called “Email”.

When you hit the enter button, those two bits of information get added automatically to an autoresponder that is used to send you the information you requested. The information actually gets added to a database and within that database there can be other fields too such as the date and time that you subscribed to the newsletter.

Now suppose you want to send some other information to the autoresponder at the same time as you add the email and name details. Perhaps you want to record the web page the user was on when they subscribed so that you can find out which web page is most effective at getting subscribers or you want to record the time and date that someone subscribed. One way to do this would be to use a hidden field. Essentially you set up code to run when the form is filled in that, in addition to creating a record of the email address and name, also sets a hidden field to contain the web page information or the time. You can in fact have lots of hidden fields in forms so it would be perfectly possible to record both the web page and the time and the date that the form was filled out.

Leave a Reply