javascript - One input triggers Chrome validation, but another isn't -
i have 3 inputs across 2 pages, of want chrome validate (i.e. won't allow form submitted if doesn't contain valid email address).
the input on this page (input a) validating fine, i'd same inputs on this page: 1 see when click options -> add/remove feeds
or options -> edit account
(input b) , 1 see when click 'get notified' (input c).
this code input a, validating properly:
<form role="form" class="form-inline" method="post"> <p>get notified when shopaholic launches</p> <input type="email" name="email" class="form-control input-lg" id="inputemail" placeholder="enter email"> <button type="submit" class="btn btn-primary btn-lg" data-dismiss="modal">notify me</button> </form>
this code inputs b , c, aren't validating:
<!-- modal containing input b --> <div class="modal fade" id="getnotifiedmodal1" tabindex="-1" role="dialog" aria-labelledby="getnotifiedlabel1" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="getnotifiedmodal1label">sorry, feature unavailable in demo version.</h4> </div> <div class="modal-body"> <p id="p">but why not notified when full version of shopaholic launches?</p> <form role="form" class="form-inline" method="post"> <input type="email" name="email" class="form-control" id="inputemail" placeholder="enter email"> <button type="submit" class="btn btn-primary" data-dismiss="modal">notify me</button> </form> </div> </div> </div> </div> <!-- modal containing input c --> <div class="modal fade" id="getnotifiedmodal2" tabindex="-1" role="dialog" aria-labelledby="getnotifiedlabel2" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="getnotifiedmodal2">get notified when shopaholic launches!</h4> </div> <div class="modal-body"> <form role="form" class="form-inline" method="post"> <input type="email" name="email" class="form-control" id="inputemail" placeholder="enter email"> <button type="submit" class="btn btn-primary" data-dismiss="modal">notify me</button> </form> </div> </div> </div> </div>
update
i have realised chrome doing this, not bootstrap.
Comments
Post a Comment