<p dir="auto">Consider following form:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;form action=&quot;/&quot;&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;option&quot; value=&quot;default&quot;&gt;
    &lt;input type=&quot;radio&quot; name=&quot;option&quot; value=&quot;A&quot;&gt;
    &lt;input type=&quot;radio&quot; name=&quot;option&quot; value=&quot;B&quot;&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;settings[1]&quot; value=&quot;0&quot;&gt;
     &lt;input type=&quot;checkbox&quot; name=&quot;settings[1]&quot; value=&quot;1&quot; id=&quot;setting-1&quot;&gt;
    &lt;button&gt;klickme&lt;/button&gt;
&lt;/form&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">form</span> <span class="pl-c1">action</span>="<span class="pl-s">/</span>"<span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">hidden</span>" <span class="pl-c1">name</span>="<span class="pl-s">option</span>" <span class="pl-c1">value</span>="<span class="pl-s">default</span>"<span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">radio</span>" <span class="pl-c1">name</span>="<span class="pl-s">option</span>" <span class="pl-c1">value</span>="<span class="pl-s">A</span>"<span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">radio</span>" <span class="pl-c1">name</span>="<span class="pl-s">option</span>" <span class="pl-c1">value</span>="<span class="pl-s">B</span>"<span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">hidden</span>" <span class="pl-c1">name</span>="<span class="pl-s">settings[1]</span>" <span class="pl-c1">value</span>="<span class="pl-s">0</span>"<span class="pl-kos">&gt;</span>
     <span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">checkbox</span>" <span class="pl-c1">name</span>="<span class="pl-s">settings[1]</span>" <span class="pl-c1">value</span>="<span class="pl-s">1</span>" <span class="pl-c1">id</span>="<span class="pl-s">setting-1</span>"<span class="pl-kos">&gt;</span>
    <span class="pl-kos">&lt;</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span>klickme<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span>
<span class="pl-kos">&lt;/</span><span class="pl-ent">form</span><span class="pl-kos">&gt;</span></pre></div>
<p dir="auto">Form generated by CakePHP and Laravel automatically. This works the way that when no radio button was selected or checkbox was checked a value from hidden field with same <code class="notranslate">name</code> attribute used in POST and <code class="notranslate">getValue</code> method of corresponding <code class="notranslate">FormField</code> in DomCrawler.</p>
<p dir="auto">Right now this results in Fatal Error with radio button (because hidden field which is discovered first in considered as radio button, when a radio button with same name is found), see Behat/Mink#349:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Fatal error: Call to undefined method Symfony\Component\DomCrawler\Field\InputFormField::addChoice() in ./vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Form.php on line 412"><pre class="notranslate"><code class="notranslate">Fatal error: Call to undefined method Symfony\Component\DomCrawler\Field\InputFormField::addChoice() in ./vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Form.php on line 412
</code></pre></div>
<p dir="auto">and has no effect (default value from hidden field isn't used), when we're dealing with checkbox, see Behat/Mink#595 .</p>
<p dir="auto">Related issues:</p>
<ul dir="auto">
<li>Behat/Mink#349</li>
<li>Behat/Mink#595</li>
</ul>
<p dir="auto">This is actually a duplicate ticket from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="17934736" data-permission-text="Title is private" data-url="https://github.com/silexphp/Silex-WebProfiler/issues/22" data-hovercard-type="issue" data-hovercard-url="/silexphp/Silex-WebProfiler/issues/22/hovercard" href="https://github.com/silexphp/Silex-WebProfiler/issues/22">silexphp/Silex-WebProfiler#22</a> but thought I best put it here as well incase it gets missed in the Silex-WebProfiler repo.</p>
<p dir="auto">The Web Profiler seems to trigger this error since this method was added 4 days ago.</p>