title: Delete data after save inside modal bootstrap 3
body: <p>I have 2 pb to resolve with my form inside modal bootstrap 3</p>
  
  <p>First : My data is saved twice
  Second : When I save a data how to delete the data in input and textarea inside myform or if I reload the modal</p>
  
  <p>Thanks</p>
  
  <p><strong>first : catagories.php ==> call a modal</strong></p>
  
  <pre><code>   &lt;style&gt;
        .modal-dialog {
          width: 900px!important;
        }
      &lt;/style&gt;
  
      &lt;a data-toggle="modal" href="&lt;?php echo FILENAME_MANUFACTURERS_POPUP;?&gt;" data-target="#myModal"&gt;&lt;?php echo osc_image (DIR_WS_ICONS . 'create.gif', TEXT_CREATE) ?&gt;&lt;/a&gt;
     &lt;!-- Modal --&gt;
        &lt;div class="modal fade" id="myModal" 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-body"&gt;&lt;div class="te"&gt;&lt;/div&gt;&lt;/div&gt;
             &lt;/div&gt; &lt;!-- /.modal-content --&gt;
           &lt;/div&gt;&lt;!-- /.modal-dialog --&gt;
         &lt;/div&gt;&lt;!-- /.modal --&gt;
  
  **second : inside my modal :manufacturers_popup.php**
  
  
    &lt;script src="https://code.jquery.com/jquery-1.11.1.min.js"&gt;&lt;/script&gt;
    &lt;form name="ajaxform" id="ajaxform" action="manufacturers_popup_ajax.php" method="post"&gt;
      &lt;input&gt; .......&lt;/input&gt;
      &lt;textarea&gt;........&lt;/textarea&gt;
    &lt;/form&gt;
    &lt;script type="text/javascript" src="ext/javascript/bootstrap/js/bootstrap_ajax_form.js" /&gt;&lt;/script&gt;
  </code></pre>
  
  <p><strong>third : my ajax files : bootstrap_ajax_form.php</strong></p>
  
  <pre><code> $(document).ready(function()  {
      $("#simple-post").click(function()   {
        $("#ajaxform").submit(function(e) {
          $("#simple-msg").html("&lt;img src='loading.gif'/&gt;");
          var postData = $(this).serializeArray();
          var formURL = $(this).attr("action");
          $.ajax(  {
            url : formURL,
            type: "POST",
            data : postData,
            success:function(data, textStatus, jqXHR)  {
              $("#simple-msg").html('&lt;pre&gt;&lt;code class="prettyprint"&gt;'+data+'&lt;/code&gt;&lt;/pre&gt;');
            },
            error: function(jqXHR, textStatus, errorThrown)  {
              $("#simple-msg").html('&lt;pre&gt;&lt;code class="prettyprint"&gt;AJAX Request Failed&lt;br/&gt; textStatus='+textStatus+', errorThrown='+errorThrown+'&lt;/code&gt;&lt;/pre&gt;');
            }
          });
          e.preventDefault(); //STOP default action
          e.unbind();
        });
        $("#ajaxform").submit(); //SUBMIT FORM
      });
    });
  </code></pre>