AmaxlabFormBundle provides some useful form types for Symfony2 framework
composer require amaxlab/form-bundle
$bundles = array(
...
new Amaxlab\Bundle\FormBundle\AmaxlabFormBundle(),
);
Create new recaptcha for you domain in https://www.google.com/recaptcha/intro/index.html
Add this keys to config.yml:
amaxlab_form:
recaptcha2:
public_key: 6LfaoQ4TAAAAAOdnLoFZIjBayGa5zUyUOOeNe3y4
private_key: 6LfaoQ4TAAAAAJvOlPjYNgLUJMfNWllKR7zfiJb7
Allow select from entity from standart select or add a new Entity throw attached form
Add to you form new field (probably not mapped to entity)
$form
->add('recaptcha', 'amaxlab_recaptcha2', array(
'mapped' => false,
));
Now form will not passed validation if recaptcha is invalid.