<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$form-&gt;add('postage_option', 'entity', array(
    'class' =&gt; 'AcmeBundle:PostageOption',
    'property' =&gt; 'name',
    'multiple' =&gt; false,
    'expanded' =&gt; true
));"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>form</span>-&gt;<span class="pl-en">add</span>(<span class="pl-s">'postage_option'</span>, <span class="pl-s">'entity'</span>, <span class="pl-en">array</span>(
    <span class="pl-s">'class'</span> =&gt; <span class="pl-s">'AcmeBundle:PostageOption'</span>,
    <span class="pl-s">'property'</span> =&gt; <span class="pl-s">'name'</span>,
    <span class="pl-s">'multiple'</span> =&gt; <span class="pl-c1">false</span>,
    <span class="pl-s">'expanded'</span> =&gt; <span class="pl-c1">true</span>
));</pre></div>
<p dir="auto">Template:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{% for option in form.postage_option %}

    &lt;div&gt;
        {{ dump(option.vars.data) }}
        {{ form_widget(option) }}
    &lt;/div&gt;

{% endfor %}"><pre class="notranslate">{% for option in form.postage_option %}

    &lt;div&gt;
        {{ dump(option.vars.data) }}
        {{ form_widget(option) }}
    &lt;/div&gt;

{% endfor %}</pre></div>
<p dir="auto">The dump returns false, what is wrong with this?</p>
<p dir="auto">Using Symfony 2.2</p>
<p dir="auto">Hi</p>
<p dir="auto">We're experiencing a problem that we have workarounded but would like to know if this is an expected behavior. We're using Symfony 2.1.4.</p>
<p dir="auto">We have a controller action with defaults: {"_format" =&gt; "json"} that makes a sub-request to another controller action also with same defaults: {"_format" =&gt; "json"}.</p>
<p dir="auto">The thing is that when the subrequest is done, in the second action we're receiving a "format" =&gt; "html" (which i guess is some kind of fallback) and of course, the controller returns json format, not html</p>
<p dir="auto">We've workarounded it with</p>
<p dir="auto">$this-&gt;forward('Controller:whatever', array('_format' =&gt; 'json')) and this way, the subrequest returns a json</p>
<p dir="auto">After some investigation, we've seen that inside HttpFoundation/Request.php -&gt; duplicate</p>
<p dir="auto">$dup-&gt;format is set to null</p>
<p dir="auto">So it seems that it is reset when duplicated</p>
<p dir="auto">Is this a bug or an expected behavior? (and what I am calling workaround is the proper way to go)</p>
<p dir="auto">We expected the subrequest to be called with the format from the master request, but maybe we're wrong</p>
<p dir="auto">Any thoughts and replies will be much appreciated</p>