<p dir="auto">Something like the following isn't possible at the moment:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;select name=&quot;select&quot;&gt;
   &lt;option class=&quot;x&quot; value=&quot;1&quot;&gt;red&lt;/option&gt;
   &lt;option value=&quot;2&quot;&gt;blue&lt;/option&gt;
   &lt;option class=&quot;y&quot; data-value=&quot;3&quot; value=&quot;3&quot;&gt;green&lt;/option&gt;
&lt;/select&gt;"><pre class="notranslate"><code class="notranslate">&lt;select name="select"&gt;
   &lt;option class="x" value="1"&gt;red&lt;/option&gt;
   &lt;option value="2"&gt;blue&lt;/option&gt;
   &lt;option class="y" data-value="3" value="3"&gt;green&lt;/option&gt;
&lt;/select&gt;
</code></pre></div>
<p dir="auto">I want to add some custom attributes to choice options.</p>
<p dir="auto">It would be nice to be able to define extra HTML attributes for choices in a choice list that are added to the <code class="notranslate">option</code> or <code class="notranslate">input</code> tags.</p>
<p dir="auto">Origin of this ticket: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3393283" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/3456" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/3456/hovercard" href="https://github.com/symfony/symfony/issues/3456">#3456</a></p>