Skip to content

Conversation

kuusas
Copy link
Contributor

@kuusas kuusas commented Jan 3, 2014

Accessing form values via vars property instead of getter. Updated PHP templating examples.

kuusas added 3 commits January 3, 2014 12:53
Accessing form values via `vars` property instead of getter. Updated PHP templating examples.
Accessing form values via `vars` property instead of getter. Updated PHP templating examples.
@kuusas
Copy link
Contributor Author

kuusas commented Jan 3, 2014

Fixed typo.

@@ -890,7 +890,7 @@ to get the ``id``:

.. code-block:: html+php

<?php echo $form['task']->get('id') ?>
<?php echo $form['task']['vars']['id']?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be ->vars, not ['vars'], otherwise you are not accessing the variables of the FormView, but retrieving the child form named vars

@kuusas
Copy link
Contributor Author

kuusas commented Jan 3, 2014

Whoops. fixed.

weaverryan added a commit that referenced this pull request Jan 7, 2014
@weaverryan weaverryan merged commit 3a2f53d into symfony:2.3 Jan 7, 2014
@weaverryan
Copy link
Member

Thanks Zilvinas! Great fix - easy merge!

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants