<p dir="auto">Use case: I have an an entity with 10 properties, and a form which only edits 2 of those properties. That form has all the fields in the entity, but it only renders these 2 in the template.</p>
<p dir="auto">The incoming request only has these 2 properties set, but when I bind it to the form, already populated with the entity in the Database, all files not included in the request are set to null.</p>
<p dir="auto">I would not like create a new form for this, so i feel that the bindRequest command should not reset missing fields to null in the entity, only ignore them.</p>
<p dir="auto">This line seems to be the trouble <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Form.php#L493">https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Form.php#L493</a></p>
<p dir="auto">Is this an issue? Can it be solved?</p>
<p dir="auto"><strong>Description</strong></p>

<p dir="auto">This is an idea of improvement for the Form feature: allow passing parameters to the translated fields</p>
<p dir="auto">In SF, the translation feature is available almost everywhere:</p>
<ul dir="auto">
<li>The Controllers ( Fully available )</li>
<li>The Twig ( Fully available )</li>
<li>The Services ( Fully available )</li>
<li>The Forms ( Partially available )</li>
</ul>
<p dir="auto">The translation feature is partially available in the SF Forms because we cannot translate the keys <strong>which are expecting parameters</strong> to be translated.</p>
<hr>
<p dir="auto">If the translation parameters would be available directly in the Form Classes,<br>
the SF developers would have theses gains :</p>
<ul dir="auto">
<li>Be able to create SF Forms Fully Dynamic</li>
<li>Avoid duplicating some keys specific to the forms</li>
</ul>
<hr>
<p dir="auto">Currently in the Twig templates there are two ways to display a SF Form :</p>
<p dir="auto">1 - Integrate the fields manually One by One</p>
<p dir="auto">2 - Integrate the fields dynamically by looping over each field of the form</p>
<p dir="auto">I am using the second Method for the following reasons:</p>
<blockquote>
<p dir="auto">It is time consuming to integrate all the fields of a form manually ( one by one ) in twig template.</p>
</blockquote>
<blockquote>
<p dir="auto">It is also time consuming to maintain a form if we have to touch two different layers (Twig+ Form Class) for each modification.</p>
</blockquote>
<p dir="auto"><strong>Example</strong></p>

<p dir="auto">-&gt; This is French translation file : App.fr.yml</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="views:
      index:
            created_at: crée le %date%"><pre class="notranslate"><span class="pl-ent">views</span>:
      <span class="pl-ent">index</span>:
            <span class="pl-ent">created_at</span>: <span class="pl-s">crée le %date%</span></pre></div>
<p dir="auto">-&gt; This is my English Translation file : App.en.yml</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="views:
      index:
            created_at: created at %date%"><pre class="notranslate"><span class="pl-ent">views</span>:
      <span class="pl-ent">index</span>:
            <span class="pl-ent">created_at</span>: <span class="pl-s">created at %date%</span></pre></div>
<p dir="auto">-&gt; This is my Form</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="...
            -&gt;add('created', DateTimeType::class,
                array('label' =&gt; 'views.index.created_at',
                  'widget' =&gt; 'single_text',
                  'input' =&gt; 'datetime',
                  'format' =&gt; 'dd/MM/yyyy HH:mm',
                  'attr' =&gt; array('data-date-format' =&gt; 'DD-MM-YYYY HH:mm'),
                  'translation_domain' =&gt; 'App'));
  ..."><pre class="notranslate"><span class="pl-c1">.</span>.<span class="pl-c1">.</span>
            -&gt;add(<span class="pl-s">'created'</span>, <span class="pl-v">DateTimeType</span>::class,
                <span class="pl-en">array</span>(<span class="pl-s">'label'</span> =&gt; <span class="pl-s">'views.index.created_at'</span>,
                  <span class="pl-s">'widget'</span> =&gt; <span class="pl-s">'single_text'</span>,
                  <span class="pl-s">'input'</span> =&gt; <span class="pl-s">'datetime'</span>,
                  <span class="pl-s">'format'</span> =&gt; <span class="pl-s">'dd/MM/yyyy HH:mm'</span>,
                  <span class="pl-s">'attr'</span> =&gt; <span class="pl-en">array</span>(<span class="pl-s">'data-date-format'</span> =&gt; <span class="pl-s">'DD-MM-YYYY HH:mm'</span>),
                  <span class="pl-s">'translation_domain'</span> =&gt; <span class="pl-s">'App'</span>));
  <span class="pl-c1">.</span>.<span class="pl-c1">.</span></pre></div>
<p dir="auto">-&gt; This is my Twig template :</p>
<div class="highlight highlight-text-html-twig notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{% for key, field in form.children %}
       &lt;div class=&quot;form-group form-md-line-input form-md-floating-label&quot; id=&quot;block_{{ key }}&quot;&gt;
           {{form_label(field)}}
           {{form_errors(field)}}
           {{form_widget(field)}}
        &lt;/div&gt;
{% endfor %}"><pre class="notranslate">{% <span class="pl-k">for</span> <span class="pl-smi">key</span>, <span class="pl-smi">field</span> <span class="pl-k">in</span> <span class="pl-smi">form</span>.<span class="pl-smi">children</span> %}
       &lt;<span class="pl-ent">div</span> <span class="pl-e">class</span>=<span class="pl-s"><span class="pl-pds">"</span>form-group form-md-line-input form-md-floating-label<span class="pl-pds">"</span></span> <span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>block_{{ <span class="pl-smi">key</span> }}<span class="pl-pds">"</span></span>&gt;
           {{form_label(<span class="pl-smi">field</span>)}}
           {{form_errors(<span class="pl-smi">field</span>)}}
           {{form_widget(<span class="pl-smi">field</span>)}}
        &lt;/<span class="pl-ent">div</span>&gt;
{% <span class="pl-k">endfor</span> %}</pre></div>