Anti-spam honeypots are perhaps the best way to guard your forms from spam submissions. By default Gravity Forms does not add a honeypot to your form; you have to check the appropriate box on the Forms Settings page. However, if you want to enforce anti-spam honeypots on all Gravity forms then you can add this simple snippet. Warning: this function overrides the anti-spam checkbox setting for all your forms.
by Tim Jensen