Reputation: 15109
I have a twig template (home.twig
), and I'm using
{{ render(controller('WebsiteUserBundle:Registration:register',{ 'template': 'popup'} )) }}
inside that template to render another template (login.twig
), which is used to login the user from a popup.
The problem is that the form_widget
isn't rendered, but the form_label
is.
This is part of my login template:
<div class="row-fluid">
{{ form_label(form.email, 'Email:')}}
{{ form_widget(form.email, { 'attr': {'class': 'span12'} }) }}
</div>
And by "it's not rendered", I mean that there isn't even an empty div
or input
next to the label
element in the DOM.
Why is this happening?
Upvotes: 2
Views: 1448
Reputation: 21
I had the same issue and was because I had the follow sentence before the form_widget
{{ form_rest(form) }}
Check that the form_rest be after of all your form_widget.
Upvotes: 1
Reputation: 1684
if you get only form_widget without extra params, like this :
{{ form_widget(form.email) }}
do you have more informations or any output ?
Upvotes: 0