i want to submit a form but before submit i want to take a value from modal form
<p>I want to submit a form but before submit i want to take a value from modal form . Actual requirement is that, i have to select multiple rows using checkbox and then i want to update database value. </p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>// &lt;!-- JAVASCRIPT ON MODAL FORM SUBMIT --&gt;
function changeLeadStage() {
  if (confirm("Are you sure want to UPDATE lead ?")) {
    document.frmUser.action = './changeleads.php';
    document.frmUser.submit();
  }
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!-- BUTTON PRESSED AFTER SELECTING ROWS --&gt;

&lt;input type="button" class="btn btn-sm btn-success warning_1" value="changeLeadStage" onClick="action/changeLeadStage();" /&gt;

&lt;!-- MODAL FORM --&gt;
for updating the database after selecting rows i opened a model form and want to take a value from dropdown of form. and after submit i want to change database value.


&lt;div id="myModal" class="modal fade"&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;×&lt;/button&gt;
        &lt;h4 class="modal-title"&gt;Subscribe our Newsletter&lt;/h4&gt;
      &lt;/div&gt;
      &lt;div class="modal-body"&gt;

        &lt;form name="frmUser" action="" method="POST"&gt;

          &lt;select name="leadStageName" type="text" style="padding:5px; border-radius:3px;" required /&gt;
          &lt;option value="" selected&gt;Select LeadStage&lt;/option&gt;
          &lt;option value="LeadStage1"&gt;LeadStage1&lt;/option&gt;
          &lt;option value="LeadStage2"&gt;LeadStage2&lt;/option&gt;
          &lt;option value="LeadStage3"&gt;LeadStage3&lt;/option&gt;
          &lt;option value="LeadStage4"&gt;LeadStage4&lt;/option&gt;
          &lt;option value="LeadStage5"&gt;LeadStage5&lt;/option&gt;
          &lt;/select&gt;
          &lt;br&gt;
          &lt;br&gt;
          &lt;br&gt;
          &lt;input type="submit" name="changeLeadStage" class="btn btn-sm btn-success warning_1" onClick="action/changeLeadStage();" /&gt;
        &lt;/form&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>