Answers for "error form bootstrap"

2

bootstrap form input select

<div class="col-lg-6 col-md-6 col-12">
  <div class="input-group mb-3">
    <div class="input-group-prepend">
      <select class="form-control select2bs4" name="country_code" id="country_code" style="width: 100%">
        <option value="+91">+91</option>
        <option value="+351">+351</option>
        <option value="+1">+1</option>
      </select>
    </div>
    	<input type="text" name="user" class="form-control" placeholder="Email Or Mobile Number">
    </div>
</div>
Posted by: Guest on September-06-2020
0

bootstrap email address validation

<form> <!--make sure you add this inside a form-->
  <div class="form-group"> <!--required to start the form container-->
    <label for="InputEmail">Email address</label> <!--"for" needs to match the "id" on the next line to bind it-->
    <input type="email" class="form-control" id="InputEmail" placeholder="Enter email"> <!--id, class, and type are required for it too look right, placeholder will edit the text inside the input box-->
    <small class="form-text">We'll never share your info.</small> <!--applies small underlining text-->
  </div>
  <div class="form-group">
    <label for="Password">Password</label>
    <input type="password" class="form-control" id="Password" placeholder="Password">
  </div>
  <div class="form-check">
    <input type="checkbox" class="form-check-input" id="Check">
    <label class="form-check-label" for="Check">Check out</label>
  </div>
  <button type="submit" class="btn btn-primary">Submit</button>
</form>
Posted by: Guest on April-08-2020
0

check if form bootstrap is valid js

function form_validate(attr_id){
    var result = true;
    $('#'+attr_id).validator('validate');
    $('#'+attr_id+' .form-group').each(function(){
        if($(this).hasClass('has-error')){
            result = false;
            return false;
        }
    });
    return result;
}
Posted by: Guest on April-28-2020

Browse Popular Code Answers by Language