empty hidden field

User 2699991 Photo


Registered User
2,478 posts

can we have a hidden field that should be empty (users cannot see it so cannot enter data.

can we make it so that if the hidden field has characters in it, then the form just doesnt

work (i'e a bot/crawler spam thingy will see a field and would usually put something in there.)
The Help You Need: When You Need It The Most
User 187934 Photo


Senior Advisor
18,728 posts

I think this can be done with JQuery. I might need a little more info on form user scenarios.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
https://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
https://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2699991 Photo


Registered User
2,478 posts

Eric Rohloff wrote:
I think this can be done with JQuery. I might need a little more info on form user scenarios.

There is no form user scenario. Just a hidden field that if it has anything in it the form doesn't work so in other words the field needs to be empty . Users cannot see the field so they cannot populate it. Bots and such can see the field so they might put something in it in which case the form won't be sent. Sort of a way to stop spamming.
The Help You Need: When You Need It The Most
User 122279 Photo


Senior Advisor
12,551 posts

I'm curious as to why you need the hidden field in the first place. If it is in order to keep bots and crawlers out, maybe you can get some help on this site: http://www.robotstxt.org/meta.html . Or some deny/allow in the htaccess file.
Spammers (I mean people who post spam) will have to be stopped in a different way, I guess. The hidden field won't know if someone is a genuine user or a spammer.
Ha en riktig god dag!
Inger, Norway
My new honey site, built with RFF: https://eikweb.com/horgenhonning/
Component sharing for RFF, RBB, RSD and SD: https://eikweb.com/sharing/


User 2147646 Photo


Registered User
230 posts

The type attribute would have the value of hidden so a bot would probably ignore fields with that value anyway.

User 2699991 Photo


Registered User
2,478 posts

Inger wrote:
I'm curious as to why you need the hidden field in the first place. If it is in order to keep bots and crawlers out, maybe you can get some help on this site: http://www.robotstxt.org/meta.html . Or some deny/allow in the htaccess file.
Spammers (I mean people who post spam) will have to be stopped in a different way, I guess. The hidden field won't know if someone is a genuine user or a spammer.
hmm if it's a hidden field a real person can't see it so cannot do anything to it. A real person spammed obviously will not see it. But a spamming bot or whatever you call them will regardless of the attribute and will fill it with something. It's only a little thought just curious that's all
The Help You Need: When You Need It The Most
User 122279 Photo


Senior Advisor
12,551 posts

You could try this in your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^.*(Baiduspider|HTTrack|Yandex).*$ [NC]
RewriteRule .* - [F,L]

Just add the names of the bots in question.
Ha en riktig god dag!
Inger, Norway
My new honey site, built with RFF: https://eikweb.com/horgenhonning/
Component sharing for RFF, RBB, RSD and SD: https://eikweb.com/sharing/


User 187934 Photo


Senior Advisor
18,728 posts

Add a input and set it to display none with CSS.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
https://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
https://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2699991 Photo


Registered User
2,478 posts

Eric Rohloff wrote:
Add a input and set it to display none with CSS.


Thanks Eric
I know about that what I was thinking is how to stop the submit button working if that field had something in it (other words not empty
The Help You Need: When You Need It The Most
User 2699991 Photo


Registered User
2,478 posts

Inger wrote:
You could try this in your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^.*(Baiduspider|HTTrack|Yandex).*$ [NC]
RewriteRule .* - [F,L]

Just add the names of the bots in question.

I don't know the names of the bots etc,
this is just an idea I have for the themes that I am doing, I obviously can't guess which if any of the people who buy the theme are going to get. I was just thinking about making something simple for them, as a sort of precaution, but one which wouldn't have them get too involved.

Seems to be a bit too complicated
(I can do it within mailer.php, but would still need some extra work from the purchaser.

Thanks all for the suggestions
Think I will have to forget this idea.
The Help You Need: When You Need It The Most

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.