html - Bootstrap 3: Form "required" not working in mobile devices -


i'm working on form styled bootstrap , connected google docs doing little hack. form works great when test in browser , developer tools emulators. if leave blank space, small pop tells me fill space before continuing , doesn't post information spreadsheet nor advancing greeting page (expected behavior).

however when test in iphone , other mobile devices doesn't work. can leave blank spaces , ignores "required" condition , takes me greeting pages.

as can see that's problem. want form behave behaves on browser. ideas?

<!-- form --> <div class="col-lg-6 form-container" style="margin-top: 20px; margin-left:-20px"> <script type="text/javascript">var submitted=false;</script>     <iframe name="hidden_iframe" id="hidden_iframe"     style="display:none;" onload="if(submitted)     {window.location='thank-you.html';}"></iframe>     <form class="form-horizontal" action="https://docs.google.com/a/xxxxxxxx.com/forms/d/1psz4jlsvcmr99r7qdg0lsv0wjjwzm1aszbecmwpfx-w/formresponse" method="post"     target="hidden_iframe" onsubmit="submitted=true;"> <fieldset>  <!-- form name --> <h3 class="centered"><span class="glyphicon glyphicon-ok"></span> api key today</h3>  <!-- text input--> <div class="form-group">   <label class="col-md-4 control-label" for="full name">full name*</label>     <div class="col-md-4">   <input type="text" name="entry.492241038" value="" class="form-control input-md required" id="entry_492241038" dir="auto" aria-label="1  " aria-required="true" required="" title="">    </div> </div>  <!-- text input--> <div class="form-group">   <label class="col-md-4 control-label" for="company">company*</label>     <div class="col-md-4">   <input type="text" name="entry.22144039" value="" class="form-control input-md required" id="entry_22144039" dir="auto" aria-label="2  " aria-required="true" required="" title="">    </div> </div>  <!-- text input--> <div class="form-group">   <label class="col-md-4 control-label" for="company email">company email*</label>     <div class="col-md-4">   <input type="text" name="entry.1882859742" value="" class="form-control input-md required" id="entry_1882859742" dir="auto" aria-label="3  " aria-required="true" required="" title="">    </div> </div>  <!-- text input--> <div class="form-group">   <label class="col-md-4 control-label" for="phone number">phone number*</label>     <div class="col-md-4">   <input type="text" name="entry.1063706991" value="" class="form-control input-md required" id="entry_1063706991" dir="auto" aria-label="4  " aria-required="true" required="" title="">    </div> </div>  <!-- textarea --> <div class="form-group">   <label class="col-md-4 control-label" for="how use api?">how use api?*</label>   <div class="col-md-4">                        <textarea name="entry.1508475478" rows="3" cols="0" class="form-control input-md required" id="entry_1508475478" dir="auto" aria-label="5  " aria-required="true" required=""></textarea>   </div>  </fieldset> <div class="submit-button centered">     <!-- <input type="submit" name="submit" value="submit" id="ss-submit"> -->     <button href="thank-you.html" class="btn btn-info btn-lg bttxt submit" id="ss-submit" name="submit" type="submit" value="submit"> started </button> </div> </form>  </div> 

the required attribute not working, might want use polyfill. in case use webshim, work following lines:

<script src="js/modernizr-custom.js"></script> <script src="js-webshim/minified/polyfiller.js"></script>  <script>    //request features need:   webshims.polyfill('forms');  </script> 

here example bootstrap including instant validation:

http://jsfiddle.net/trixta/t29kx/light/


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -