Skip to content

Commit

Permalink
Update recipe_dynamic_form_modification.rst
Browse files Browse the repository at this point in the history
`$subject->isNew()` is not defined
  • Loading branch information
manu-sparheld authored and OskarStark committed Aug 22, 2019
1 parent ef06d3e commit 46c3a09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/cookbook/recipe_dynamic_form_modification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Then, you should be able to dynamically add needed fields to the form::

$subject = $this->getSubject();

if ($subject->isNew()) {
if ($this->isNew()) {
// The thumbnail field will only be added when the edited item is created
$formMapper->add('thumbnail', FileType::class);
}
Expand Down

0 comments on commit 46c3a09

Please sign in to comment.