title: Placing the results of a form post into a modal in Bootstrap 3
body: <p>How can I get the results of a form post to display in a modal window in Bootstrap 3?</p>
  
  <p>I have a list of items, and each item has an "edit" button. When an edit button is clicked, I need to post to a form and trigger a modal pop-up with the response. I'm trying to do this using jQuery's <code>.ajax()</code> function, and I'm not sure if it's the best approach:</p>
  
  <pre><code>$(".editForm").submit(function() {
      $.ajax({
          type        : "POST",
          cache       : false,
          url         : "./edit_form.php",
          data        : $(this).serializeArray(),
          success: function() {
              ##  How do I get the response to show up in a Bootstrap 3 modal? ##
          }
      });
      return false;
  });
  </code></pre>
  
  <p>But, I'm getting stuck when it's time to parse the result of the form post. How can I get that to appear in a modal pop-up in Bootstrap 3? The Bootstrap docs talk about triggering a modal from an anchor link with <code>&lt;a data-toggle="modal" href="remote.html" data-target="#modal"&gt;Click me&lt;/a&gt;</code>, but how would you trigger it with a form post?</p>
  
  <p>Maybe I'm thinking about it backwards, or over-complicating it. Perhaps I should open the modal first, then submit the <code>.ajax()</code> form post, then update the <code>&lt;div&gt;</code> with the result. I'm used to using Fancybox, and am switching to Bootstrap for all modals.</p>
  
  <p>Thanks!</p>