javascript - bootstrapvalidator submit button not allowed after validation error -


i'm running form bootstrapvalidator.

if submit form while there still validation errors (for example, forgot input 1 of fields), when finish filling form fields properly, submit button maintains "cursor: not-allowed" style got initial submission:

<form id="invoice_form" class="well form-horizontal" action="submit.php" method="post" data-toggle="validator"">     <fieldset>         ...         <!-- button -->         <div class="form-group">           <label class="col-md-4 control-label"></label>           <div class="col-md-4" style="text-align: left;">             <button type="submit" class="btn btn-primary" > send <span class="glyphicon glyphicon-send"></span></button>           </div>         </div>     </fieldset> </form> 

thanks,

david

edit: didn't succeed run code on fiddle, able locate problem: when use following code force value 1 of fields (service drop down calls function set amount), amount field remains considered invalid (label doesn't change green), although form can submitted: <script> function showamount() { var amounts = { "service_a": "300", "service_b": "450", "service_c": "500", "other": "" }; var x = document.getelementbyid("service").value; document.getelementbyid("amountdiv").style.display = "block"; if (x != ''){ document.getelementbyid("amount").value = parseint(amounts[x]); } else { document.getelementbyid("amount").value = ''; } } </script> seems me need manually run validation on forced value, once value entered...

any suggestion on if , how can done?

thanks


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -