Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit de71a51

Browse filesBrowse files
committed
bug #3551 [Cookbook][Dynamic Form Modification] Fix sample code (rybakit)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #3551). Discussion ---------- [Cookbook][Dynamic Form Modification] Fix sample code Commits ------- 0497b38 [Cookbook][Dynamic Form Modification] Fix sample code
2 parents 143db2f + 66c4d77 commit de71a51
Copy full SHA for de71a51

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎cookbook/form/dynamic_form_modification.rst

Copy file name to clipboardExpand all lines: cookbook/form/dynamic_form_modification.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ the event listener might look like the following::
123123
// check if the Product object is "new"
124124
// If no data is passed to the form, the data is "null".
125125
// This should be considered a new "Product"
126-
if (!$product || null !== $product->getId()) {
126+
if (!$product || null === $product->getId()) {
127127
$form->add('name', 'text');
128128
}
129129
});
@@ -212,7 +212,7 @@ class::
212212
$product = $event->getData();
213213
$form = $event->getForm();
214214

215-
if (!$product || null !== $product->getId()) {
215+
if (!$product || null === $product->getId()) {
216216
$form->add('name', 'text');
217217
}
218218
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.