Skip to content

Update forms.rst #3409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 7, 2014
Merged

Update forms.rst #3409

merged 4 commits into from
Jan 7, 2014

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