July 20, 201016 yr Dear experts, I'm trying to make my email interface workable and got to see this form designed by another company. There's this hidden element there..whereby the type they put hidden. What is this hidden function about? Do I need to add in this hidden field in my database when I design with a hidden type ? Hope to hear your advice. thanks.
July 20, 201016 yr Its possibly to stop spambots, a spambot will see it as another field to fill in and when the form is submitted it will be rejected by the processing script as the hidden field has content.
July 20, 201016 yr also known as a web form honey-trap I believe Basically you have a hidden field, call it something like emailaddress (or something a bot will feel it NEEDS to fill in) and then tell the script that if that field is populated, then fail. Quite a simple way of doing things really, but I prefer a captcha myself
July 20, 201016 yr Hidden fields in forms are usually used for session tokens to prevent CSRF attacks, but can also be used to attach information to a form submission that you might not really need the user to see. For example, I have a "Request a Quote" form on a website that sends a email to the site owner with details about the user. It has a hidden field that is automatically filled in php with the Offer the user was looking at before they click on the link. The user doesn't really need to see this information, she knows what offer she was just looking at, but the site owner does so he can create a quote for that offer. To explain the CSRF attacks, if, say a bank website has some form which posts to transfer-cash.php, If on my site i can use some evil stuff to POST to that script with cashTo=my_account ammountCash=99999, because the POST is running on the users' side it'll send his cookies with it, and if he's already authenticated with the bank then the request will go through and I've just stole his money. To protect against these attacks if you add a hidden session token every time you present a form, then require this matching token be provided before you process the form, then it help mitigate some of this.
Create an account or sign in to comment