Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Form] Cannot access data in "entity" form type. #7282

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

Closed
Paxton opened this issue Mar 6, 2013 · 2 comments
Closed

[Form] Cannot access data in "entity" form type. #7282

Paxton opened this issue Mar 6, 2013 · 2 comments
Labels

Comments

@Paxton
Copy link

Paxton commented Mar 6, 2013

$form->add('postage_option', 'entity', array(
    'class' => 'AcmeBundle:PostageOption',
    'property' => 'name',
    'multiple' => false,
    'expanded' => true
));

Template:

{% for option in form.postage_option %}

    <div>
        {{ dump(option.vars.data) }}
        {{ form_widget(option) }}
    </div>

{% endfor %}

The dump returns false, what is wrong with this?

Using Symfony 2.2

@franmomu
Copy link
Contributor

I think there is nothing wrong, what you are rendering are checkboxes so the data is true or false.

@webmozart
Copy link
Contributor

Duplicate of #5286

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

No branches or pull requests

3 participants