Skip to content

Commit

Permalink
[Cookbook][Dynamic Form Modification] Fix sample code
Browse files Browse the repository at this point in the history
  • Loading branch information
rybakit committed Feb 7, 2014
1 parent bdc6c3f commit 0497b38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cookbook/form/dynamic_form_modification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ the event listener might look like the following::
// check if the Product object is "new"
// If no data is passed to the form, the data is "null".
// This should be considered a new "Product"
if (!$product || null !== $product->getId()) {
if (!$product || null === $product->getId()) {
$form->add('name', 'text');
}
});
Expand Down Expand Up @@ -207,7 +207,7 @@ class::
$product = $event->getData();
$form = $event->getForm();

if (!$product || null !== $product->getId()) {
if (!$product || null === $product->getId()) {
$form->add('name', 'text');
}
}
Expand Down

0 comments on commit 0497b38

Please sign in to comment.