symfony/symfony — Issue #2919: form_row does not pass variable to form_widget
Author: chetzof
Created: 2011-12-19 12:58:45+00:00
State: open

my template

```php
{{ form_row (form.sku, { 'attr': { 'placeholder': 'Sku'} }) }}
```
fields.html.twig

```php
{% extends 'form_div_layout.html.twig' %}

{% block field_row %}
{% spaceless %}

{{ form_label(form) }}
{{ form_errors(form) }}
{{ form_widget(form, attr) }}
{% debug attr %}

{% endspaceless %}
{% endblock field_row %}

{% block field_widget %}
{% debug attr %}
{% spaceless %}
{% set type = type|default('text') %}

{% endspaceless %}
{% endblock field_widget %}

```

as you see i pass var `attr` from `form_row` to `form_widget`
`{{ form_widget(form, attr) }}`

`{% debug attr %}` in `field_row` outputs `array(1) { ["placeholder"]=> string(5) "Sku" } `
`{% debug attr %}` in `widget_row` outputs `array(0) { }`

P.S. I'm aware of

```php
{{ form_widget (form.sku, { 'attr': { 'placeholder': 'Sku'} }) }}
```