title: Load modal with custom data-id
body: <p>I have an issue with one of my website.</p>
  
  <p>I have some list links like this:</p>
  
  <pre><code>&lt;ul&gt;
    &lt;li&gt;&lt;a data-toggle="modal" data-target="#myModal" data-id="10"&gt;Room 10&lt;/a&gt;
    &lt;li&gt;&lt;a data-toggle="modal" data-target="#myModal" data-id="20"&gt;Room 20&lt;/a&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>On my <code>#myModal</code>, I want the form appears to edit info. So I passed the <code>data-id</code>, which is the id into my database.</p>
  
  <p>HTML is the following:</p>
  
  <pre><code>&lt;div class="modal modal-open" id="myModal"&gt;
    &lt;form class="modal-form form-horizontal"&gt;
      &lt;div class="modal-header"&gt;
        &lt;h3&gt;Room #xx&lt;/h3&gt;
      &lt;/div&gt;
      &lt;div class="modal-body"&gt; &lt;input name="roomNumber" type="text" value="xx"&gt;
      &lt;/div&gt;
      &lt;div class="modal-footer"&gt;
        &lt;button type="submit" class="btn btn-primary"&gt;Save&lt;/button&gt;
      &lt;/div&gt;
    &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My question, is how can I load the rooms infos from my db into the <code>#myModal</code> window ?</p>
  
  <p>Step by Step:</p>
  
  <ol>
  <li>I click on the Edit room link.</li>
  <li>The modal loads infos from the db.</li>
  <li>I can change info.</li>
  <li>I save the form.</li>
  <li>The modal close.</li>
  </ol>
  
  <p>Thanks a lot.</p>