Another one:

Currently there's no easy way to do a $form->getObject() on an
embedded form, you have to jump through a couple of hoops to get it,
especially if you're using partials for your sub-forms:

<?php if($form['Spaces']): ?>
  <?php $spacesForm = $form->getEmbeddedForm('Spaces') ?>

  <?php for($i = 0; $i < count($form['Spaces']); $i++): ?>
    <?php include_partial('venue/spaceForm', array('spaceForm' =>
$form['Spaces'][$i], 'space' => $spacesForm->getEmbeddedForm($i)-
>getObject())) ?>
  <?php endfor; ?>
<?php endif; ?>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to