title: On click of same button open model and then submit form
body: <p>Please help me with this : </p>
  
  <p>I have a form with a submit button . Now i want to open a modal window on click event of this button . In the modal i need to show a text box for inserting something in DB with 2 buttons : Cancel and Push . On click of push i want data to be inserted in the db and form to be submitted !!! 
  Somehow i am unable to achieve this  </p>
  
  <pre><code>&lt;form action="post_data.php" method="post"&gt;
    &lt;!-- some elements --&gt;
    &lt;input type ="submit" value = "Push data"&gt;    
  &lt;/form&gt;
  </code></pre>
  
  <p>I am using bootstrap-modal.js 
  But the problem i am facing is my form points to x.php and now if I need to open a bootstrap model then i need to provide attributes : href="mymodal_id" and data-toggle="modal" for my submit button . If i do that my page does absolutely nothing :( :( 
  Please Help 
  Any help wil be appreciated . Thanks in advance </p>