PHP code example of nzo / honeypot-bundle
1. Go to this page and download the library: Download nzo/honeypot-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nzo / honeypot-bundle example snippets
namespace Acme\DemoBundle\Form\Type;
use Nzo\HoneypotBundle\Form\Type\HoneypotType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
class FooType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
// ...
// Honeypot field
$builder->add('SOME-FAKE-NAME', HoneypotType::class);
}
}