html - How to make two bootstrap modal forms submit independently? -


i have 2 bootstrap modal forms on same html document.

i want these forms work independently, however, form 1 not submit , form2 submits data entered in both forms.

how these forms work independently without interfering actions of 1 another?

here html:

<!------------------------form1-----------------------------------> <div class="modal fade" id="register" tabindex="-1" role="dialog" aria-labelledby="orderlabel" aria-hidden="true">             <div class="modal-dialog">                 <div class="panel panel-primary">                     <div class="panel-heading">                         <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>                         <h4 class="panel-title" id="registerlabel"><span class="glyphicon glyphicon-info-sign"></span> register</h4>                     </div>                      <form id="form1" action="register.php " method="post" accept-charset="utf-8">                     <div class="modal-body" style="padding: 5px;">                                <div class="row">                                 <div class="col-lg-12 col-md-12 col-sm-12" style="padding-bottom: 10px;">                                     <input class="form-control" name="name" placeholder="name" type="text" required />                                 </div>                             </div>                             <div class="panel-footer" style="margin-bottom:-14px;" data-target="form1"  >                             <input type="submit" class="btn btn-success" value="send"/>                                 <!--<span class="glyphicon glyphicon-ok"></span>-->                             <input type="reset" class="btn btn-danger" value="clear" />                                 <!--<span class="glyphicon glyphicon-remove"></span>-->                             <button style="float: right;" type="button" class="btn btn-default btn-close" data-dismiss="modal">close</button>                         </div>                     </div>                 </div>             </div>         </div>       </div>    <!------------------------form2-----------------------------------> <div class="modal fade" id="buy" tabindex="-1" role="dialog" aria-labelledby="buylabel" aria-hidden="true">             <div class="modal-dialog">                 <div class="panel panel-primary">                     <div class="panel-heading">                         <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>                         <h4 class="panel-title" id="buylabel"><span class="glyphicon glyphicon-info-sign"></span> buy</h4>                     </div>                      <form id="form2" action="buy.php " method="post" accept-charset="utf-8">                     <div class="modal-body" style="padding: 5px;">                                <div class="row">                                 <div class="col-lg-12 col-md-12 col-sm-12" style="padding-bottom: 10px;">                                     <input class="form-control" item="item" placeholder="name" type="text" required />                                 </div>                             </div>                             <div class="panel-footer" style="margin-bottom:-14px;" data-target="form1"  >                             <input type="submit" class="btn btn-success" value="send"/>                                 <!--<span class="glyphicon glyphicon-ok"></span>-->                             <input type="reset" class="btn btn-danger" value="clear" />                                 <!--<span class="glyphicon glyphicon-remove"></span>-->                             <button style="float: right;" type="button" class="btn btn-default btn-close" data-dismiss="modal">close</button>                         </div>                     </div>                 </div>             </div>         </div>       </div> 

i can't see forms ending somewhere.

please close form before starting independent.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -