title: Passing a variable into a Bootstrap modal
body: <p>I am able to pass the variable to the bootstrap 3 modal at the bottom of the modal where it says  id="callId"  but how do I pass the callID to the modal where I have  $test = callId .</p>
  
  <pre><code>&lt;a data-id="&lt;?=$sid?&gt;" data-conf="&lt;?=$call_conf?&gt;" class="open-AddCallDialog btn btn-success btn-xs" href="#addCallDialog"&gt;Call Borrower&lt;/a&gt;
  </code></pre>
  
  <p>The jquery script</p>
  
  <pre><code>$(document).on("click", ".open-AddCallDialog", function (e) {
  
      e.preventDefault();
  
      var _self = $(this);
  
      var myCallId = _self.data('id');
      $("#callId").val(myCallId);
  
      $(_self.attr('href')).modal('show');
  });
  </code></pre>
  
  <p>The Modal</p>
  
  <pre><code>&lt;div class="modal fade" id="addCallDialog"&gt; tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
    &lt;div class="modal-dialog"&gt;
      &lt;div class="modal-content"&gt;
        &lt;div class="modal-header"&gt;
          &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;
          &lt;h4 class="modal-title" id="myModalLabel"&gt;Call Borrower&lt;/h4&gt;
        &lt;/div&gt;
        &lt;div class="modal-body"&gt;
        &lt;div class="row well"&gt;
         $test = call_conf;
  
  
  
        &lt;/div&gt;
        &lt;/div&gt;
         &lt;div class="modal-footer"&gt;
          &lt;input name="id" id="callId" type="hidden" value=""/&gt; 
          &lt;input name="pid" type="hidden" value="&lt;?php echo $pid;?&gt;"/&gt;
          &lt;input name="processtp" type="hidden" value="callborrower"/&gt;
          &lt;button id="submit" class="btn btn-primary btn-block btn-xs center"&gt;Update&lt;/button&gt;
        &lt;/div&gt;
        &lt;/form&gt;
        &lt;/div&gt;
  
      &lt;/div&gt;&lt;!-- /.modal-content --&gt;
    &lt;/div&gt;&lt;!-- /.modal-dialog --&gt;
  </code></pre>