Browse Source

Added a comment in the sample

Stepan Anchugov 11 years ago
parent
commit
f1b3c80bd8
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Resources/doc/cookbook/recipe_dynamic_form_modification.rst

+ 1 - 0
Resources/doc/cookbook/recipe_dynamic_form_modification.rst

@@ -25,6 +25,7 @@ In your ``Admin`` class's ``configureFormFields`` method you're able to get the
         // $subject is your underlying model,
         // $subject is your underlying model,
         // do what you need to figure out if you'll have to modify the form
         // do what you need to figure out if you'll have to modify the form
         if ($subject->isNew()) {
         if ($subject->isNew()) {
+            // The thumbnail field will only be added when the edited item is newly created
             $formMapper->add('thumbnail', 'file');
             $formMapper->add('thumbnail', 'file');
         }
         }
       }
       }