Skip to content

Commit

Permalink
Merge pull request genemu#345 from Molkobain/patch-1
Browse files Browse the repository at this point in the history
Update index.md
  • Loading branch information
genemu committed Jun 25, 2014
2 parents 83deea1 + 019c761 commit 218cf52
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Resources/doc/recaptcha/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ public function buildForm(FormBuilder $builder, array $options)
}
```

## Common usages:
### Add captcha in an entity form:

If the captcha field is included in an entity form (eg: User registration), you might have an NoSuchPropertyException. As the captcha is not part of the entity, you have to set the ```mapped``` option to ```false```.

``` php
<?php
// ...
public function buildForm(FormBuilder $builder, array $options)
{
$builder
// ...
->add('captcha', 'genemu_recaptcha', array('mapped' => false));
}
```

## Extra:

[Configuration](https://github.com/genemu/GenemuFormBundle/blob/master/Resources/doc/recaptcha/default.md)

0 comments on commit 218cf52

Please sign in to comment.