title: Better dropdown with bootstrap
body: <p>I try to use dropdowns of bootstrap, it's work the problem is esthetic. : </p>
  
  <p><a href="http://twitter.github.io/bootstrap/javascript.html#dropdowns" rel="nofollow noreferrer">http://twitter.github.io/bootstrap/javascript.html#dropdowns</a></p>
  
  <p>I have this code :</p>
  
  <pre><code>&lt;div class="dropdown"&gt;
       &lt;a class="dropdown-toggle" data-toggle="dropdown" href="#"&gt;Colléctivités &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;
       &lt;ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"&gt;
       &lt;?php
           foreach ($collectivite as $key =&gt; $value) {
                echo '&lt;form method="post" action="wbx.php"&gt;&lt;li&gt;&lt;button type="submit" class="btn" style="margin:0px;" name="cookie" value='.$value.'&gt;'.$value.'&lt;/button&gt;    &lt;/li&gt;&lt;/form&gt;';
           }
  
        ?&gt;
     &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>WITHOUT PHP :</p>
  
  <pre><code>&lt;div class="dropdown"&gt;
      &lt;a class="dropdown-toggle" data-toggle="dropdown" href="#"&gt;Colléctivités &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;
      &lt;ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"&gt;
          &lt;form method="post" action="wbx.php"&gt;
              &lt;li&gt;
                  &lt;button type="submit" class="btn" style="margin:0px;" name="cookie" value=heeloWorld.net&gt;world.net&lt;/button&gt;
              &lt;/li&gt;
          &lt;/form&gt;                    
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>But the result is very basic... not really good. I use <strong>button</strong> because i <strong>submit</strong> some data with <strong>form</strong>
  So if i want something like this, how can i do ?</p>
  
  <p><img src="https://i.stack.imgur.com/nzWCy.png" alt="enter image description here"></p>
  
  <p><strong>EDIT solution</strong></p>
  
  <p>I Use this : the alert is ok, i have the good value, but the submit doesn't work.</p>
  
  <pre><code>&lt;?php
      foreach ($collectivite as $key =&gt; $value) {
          $name = preg_replace('#[^0-9a-z]+#i', '', $value);
          echo '&lt;form method="post" action="wbx.php" id='.$name.'&gt;
              &lt;input type="hidden"  name="cookie"   value='.$value.'&gt;
          &lt;/form&gt;';
      }
  ?&gt;
  &lt;div class="dropdown"&gt;
      &lt;a class="dropdown-toggle" data-toggle="dropdown" href="#"&gt;Colléctivités &lt;b     class="caret"&gt;&lt;/b&gt;&lt;/a&gt;
      &lt;ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"&gt;
          &lt;?php
              foreach ($collectivite as $key =&gt; $value) {
                      $name = preg_replace('#[^0-9a-z]+#i', '', $value);
  
                      echo '&lt;li&gt;
                          &lt;input type="hidden"  name="cookie"   value='.$value.'&gt;
                          &lt;a class="myformlink" data-formname="#'.$name.'" &gt;'.$value.'&lt;/a&gt;
                      &lt;/li&gt;';
              }
  
          ?&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  &lt;script type="text/javascript"&gt;
          $(document).ready(function() {
          $('.myformlink').click(function(){
              $($(this).data('formname')).submit();
          });
      });
  &lt;/script&gt;
  </code></pre>