title: How to set default value on a Symfony form embedded in another form?
body: <p>How does one set the default form value of a Symfony form embedded within another form that are both associated with entities? </p>
  
  <p>If I try to set the street property in my PropertyLocation entity to a default value in the following example, this default value does not get shown when the form renders. I know there is a data option for each form field that I could use, but I would rather not do it this way since that overrides what is set in the entity. How can I make the form show the default value stored in the entity. </p>
  
  <pre><code>class PropertyType
  {
  
       /**
       * @param FormBuilderInterface $builder
       * @param array $options
       */
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder-&gt;add('propertyLocation', new PropertyLocationType());
      }
  
      /**
       * @param OptionsResolverInterface $resolver
       */
      public function setDefaultOptions(OptionsResolverInterface $resolver)
      {
          $resolver-&gt;setDefaults(
               array('data_class' =&gt; 'UR\AppBundle\Entity\Property'
          ));
      }
  
      /**
       * @return string
       */
      public function getName()
      {
          return 'property';
      }
  }
  </code></pre>
  
  <p>Property Location Type looks like:</p>
  
  <pre><code>class PropertyLocationType extends AbstractType 
  {
  
      /**
       * @param FormBuilderInterface $builder
       * @param array $options
       */
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder-&gt;add('street', 'text');
      }
  
     /**
      * @param OptionsResolverInterface $resolver
      */
      public function setDefaultOptions(OptionsResolverInterface $resolver)
      {
          $resolver-&gt;setDefaults(array(
          'data_class' =&gt; 'UR\AppBundle\Entity\PropertyLocation'
          ));
      }
  
     /**
      * @return string
      */
      public function getName()
      {
          return 'propertyLocation';
      }
   }
  </code></pre>