Click to See Complete Forum and Search --> : Validate hidden field is left blank


specialK1024
02-19-2009, 06:05 AM
Looked for answer in this forum & many other places, can't see it. Just want to know how to ensure a hidden field is left blank using form validation. Area in blue is where I am stuck.
Code snippet follows :
...
frmvalidator.addValidation("Email","req", "Please enter your e-mail address");
frmvalidator.addValidation("Hidden","req", "No data please");
</script>
...
Thanks for any help or direction you can give!

Fang
02-19-2009, 08:38 AM
Why would you validate a hidden field, the user can not change it's value.

felgall
02-19-2009, 01:56 PM
The only way that makes sens is if it is a regular input field that is hidden via CSS so that real visitors don't see it but spambots do.

You would then perform the validation that the field is empty on the server since the spambots will also have JavaScript disabled.

specialK1024
02-19-2009, 04:12 PM
Sorry, should have mentioned that is what I was doing (using CSS to hide field & get around spambots).

Again, sorry for my ignorance, but how would I validate it on the server? Using ASP.net so in the gdform.asp file?

Thanks!