Bootstrap 4 Forms With 2 Columns (Dynamic) - html

I have a user registration form (Bootstrap 4 - in Razor Template)
I will hide some part of form depends on user fillings. My registration form has 2 step. Here is second step.
If user selects a country that hasn't states. I will hide states.
Here is the problem.
If I write code like in here when i hide states that part will be missing.
I wrote code like below using float-left. If I hide any part the other parts moves and fill the missing part.
<div class="container py-5 bg-warning">
<div class="row">
<div id="register" class="col-md-10 mx-auto">
<form asp-action="Create" method="post">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
#if (#Model.StateList != null)
{
<div class="form-group col-sm-6 float-left">
<label asp-for="State"></label>
#Html.DropDownListFor(m => m.StateList, #Model.StateList, "- Please Select -",
new {#class = "form-control"})
<span asp-validation-for="State" class="text-danger fixed-span"></span>
</div>
}
<div class="form-group col-sm-6 float-left">
<label asp-for="City"></label>
<input asp-for="City" class="form-control" />
<span asp-validation-for="City" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="Phone"></label>
<input asp-for="Phone" class="form-control" />
<span asp-validation-for="Phone" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="Company"></label>
<input asp-for="Company" class="form-control" />
<span asp-validation-for="Company" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="TaxId"></label>
<input asp-for="TaxId" class="form-control" />
<span asp-validation-for="TaxId" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="Email"></label>
<input asp-for="Email" class="form-control" />
<span asp-validation-for="Email" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="Gender"></label>
#Html.DropDownListFor(m => m.Gender, #Model.GenderList, "- Please Select -",
new {#class = "form-control"})
<span asp-validation-for="Gender" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="ConfirmPassword"></label>
<input asp-for="ConfirmPassword" class="form-control" />
<span asp-validation-for="ConfirmPassword" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="AboutJob"></label>
<input asp-for="AboutJob" class="form-control" />
<span asp-validation-for="AboutJob" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="PostCode"></label>
<input asp-for="PostCode" class="form-control" />
<span asp-validation-for="PostCode" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="Town"></label>
<input asp-for="Town" class="form-control" />
<span asp-validation-for="Town" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="Address"></label>
<input asp-for="Address" class="form-control" />
<span asp-validation-for="Address" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="Celluar"></label>
<input asp-for="Celluar" class="form-control" />
<span asp-validation-for="Celluar" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="TaxOffice"></label>
<input asp-for="TaxOffice" class="form-control" />
<span asp-validation-for="TaxOffice" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="TaxAddress"></label>
<input asp-for="TaxAddress" class="form-control" />
<span asp-validation-for="TaxAddress" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="FullName"></label>
<input asp-for="FullName" class="form-control" />
<span asp-validation-for="FullName" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="Password"></label>
<input asp-for="Password" class="form-control" />
<span asp-validation-for="Password" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="Birthday"></label>
<input asp-for="Birthday" class="form-control" />
<span asp-validation-for="Birthday" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="CitizenId"></label>
<input asp-for="CitizenId" class="form-control" />
<span asp-validation-for="CitizenId" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6 float-left">
<label asp-for="Website"></label>
<input asp-for="Website" class="form-control" />
<span asp-validation-for="Website" class="text-danger fixed-span"></span>
</div>
<button type="submit" class="btn btn-primary px-4 float-right">Kayıt Ol</button>
</form>
</div>
</div>
As you know there is a span element for error messages under inputs. If I had an error this form looks bad. Do you have any idea to fix this attached in picture

Simple css trick solved my problem.
<style>
.form-group {
height: 80px !important;
}
</style>

Remove float-left class and add parent row class -
<div class="row">
#if (#Model.StateList != null)
{
<div class="form-group col-sm-6">
<label asp-for="State"></label>
#Html.DropDownListFor(m => m.StateList, #Model.StateList, "- Please Select -",
new {#class = "form-control"})
<span asp-validation-for="State" class="text-danger fixed-span"></span>
</div>
}
<div class="form-group col-sm-6">
<label asp-for="City"></label>
<input asp-for="City" class="form-control" />
<span asp-validation-for="City" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="Phone"></label>
<input asp-for="Phone" class="form-control" />
<span asp-validation-for="Phone" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="Company"></label>
<input asp-for="Company" class="form-control" />
<span asp-validation-for="Company" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="TaxId"></label>
<input asp-for="TaxId" class="form-control" />
<span asp-validation-for="TaxId" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="Email"></label>
<input asp-for="Email" class="form-control" />
<span asp-validation-for="Email" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="Gender"></label>
#Html.DropDownListFor(m => m.Gender, #Model.GenderList, "- Please Select -",
new {#class = "form-control"})
<span asp-validation-for="Gender" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="ConfirmPassword"></label>
<input asp-for="ConfirmPassword" class="form-control" />
<span asp-validation-for="ConfirmPassword" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="AboutJob"></label>
<input asp-for="AboutJob" class="form-control" />
<span asp-validation-for="AboutJob" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="PostCode"></label>
<input asp-for="PostCode" class="form-control" />
<span asp-validation-for="PostCode" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="Town"></label>
<input asp-for="Town" class="form-control" />
<span asp-validation-for="Town" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="Address"></label>
<input asp-for="Address" class="form-control" />
<span asp-validation-for="Address" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="Celluar"></label>
<input asp-for="Celluar" class="form-control" />
<span asp-validation-for="Celluar" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="TaxOffice"></label>
<input asp-for="TaxOffice" class="form-control" />
<span asp-validation-for="TaxOffice" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="TaxAddress"></label>
<input asp-for="TaxAddress" class="form-control" />
<span asp-validation-for="TaxAddress" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="FullName"></label>
<input asp-for="FullName" class="form-control" />
<span asp-validation-for="FullName" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="Password"></label>
<input asp-for="Password" class="form-control" />
<span asp-validation-for="Password" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="Birthday"></label>
<input asp-for="Birthday" class="form-control" />
<span asp-validation-for="Birthday" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="CitizenId"></label>
<input asp-for="CitizenId" class="form-control" />
<span asp-validation-for="CitizenId" class="text-danger fixed-span"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="Website"></label>
<input asp-for="Website" class="form-control" />
<span asp-validation-for="Website" class="text-danger fixed-span"></span>
</div>
</div>

Related

Can someone help me fix my code issue with bootstrap on Safari?

There is an issue with Bootstrap 4 and Safari broswer on Mac. When using cols inside a row. I was wondering if anyone could help me fix my issue where my form is loading incorrectly on Safari? As you can see on the chrome browser the layout looks how I want it to. However, the form doesn't load correctly on the Safari browser in terms of the layout. Page link I'm talking about.
HOW THE FORM LOOKS ON SAFARI
image 1
HOW THE FORM LOOKS ON CHROME
image 2
CODE TO PAGE
<div class="rates-form-shortcode mt-5">
<div class="text-center">
<strong style="font-weight: bolder;"><h5><u style="font-weight: 900;">BOOK A JOB</u></h5></strong>
</div>
<?php if (isset($_GET['success']) && !empty($_GET['success']) && $_GET['success'] == 'true'): ?>
<div class="custom-alert-success alert alert-success mt-3" role="alert">
Job has been booked successfully.
</div>
<?php endif; ?>
<form action="<?php echo admin_url('admin-post.php'); ?>" method="POST">
<input type="hidden" name="action" value="ccdjps_submit_rates_form">
<input type="hidden" name="rate_form_subject" value="<?php echo $atts['subject']; ?>">
<input type="hidden" name="form_refferer" value="<?php echo get_permalink(); ?>">
<div class="input-body mt-5">
<div class="form-group row">
<label for="date" class="col-sm-2 col-form-label">Date</label>
<div class="col-sm-10">
<input type="text" class="form-control datepicker" id="date" name="date" required>
</div>
</div>
<div class="form-group row">
<label for="job-reference" class="col-sm-2 col-form-label">Job Reference</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="job-reference" name="job_reference" required>
</div>
</div>
<div class="collection-delivery-row row mt-4">
<div class="col-sm-6">
<div class="text-center mb-3">
<h6 style="font-weight: bold;">Collection Address</h6>
</div>
<div class="form-group row">
<label for="collection-full-name" class="col-sm-4 col-form-label">Full Name</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="collection-full-name" name="collection_full_name" required>
</div>
</div>
<div class="form-group row">
<label for="collection-address-line-1" class="col-sm-4 col-form-label">Address Line 1</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="collection-address-line-1" name="collection_address_line_1" required>
</div>
</div>
<div class="form-group row">
<label for="collection-address-line-2" class="col-sm-4 col-form-label">Address Line 2</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="collection-address-line-2" name="collection_address_line_2">
</div>
</div>
<div class="form-group row">
<label for="collection-address-line-3" class="col-sm-4 col-form-label">Address Line 3</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="collection-address-line-3" name="collection_address_line_">
</div>
</div>
<div class="form-group row">
<label for="collection-town" class="col-sm-4 col-form-label">Town</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="collection-town" name="collection_town" required>
</div>
</div>
<div class="form-group row">
<label for="collection-post-code" class="col-sm-4 col-form-label">Post code</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="collection-post-code" name="collection_post_code" required>
</div>
</div>
<div class="form-group row">
<label for="collection-country" class="col-sm-4 col-form-label">Country</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="collection-country" name="collection_country" required>
</div>
</div>
<div class="form-group row">
<label for="collection-phone-number" class="col-sm-4 col-form-label">Phone No.</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="collection-phone-number" name="collection_phone_number" required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="text-center mb-3">
<h6 style="font-weight: bold;">Delivery Address</h6>
</div>
<div class="form-group row">
<label for="delivery-full-name" class="col-sm-4 col-form-label">Full Name</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="delivery-full-name" name="delivery_full_name" required>
</div>
</div>
<div class="form-group row">
<label for="delivery-address-line-1" class="col-sm-4 col-form-label">Address Line 1</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="delivery-address-line-1" name="delivery_address_line_1" required>
</div>
</div>
<div class="form-group row">
<label for="delivery-address-line-2" class="col-sm-4 col-form-label">Address Line 2</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="delivery-address-line-2" name="delivery_address_line_2">
</div>
</div>
<div class="form-group row">
<label for="delivery-address-line-3" class="col-sm-4 col-form-label">Address Line 3</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="delivery-address-line-3" name="delivery_address_line_3">
</div>
</div>
<div class="form-group row">
<label for="delivery-town" class="col-sm-4 col-form-label">Town</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="delivery-town" name="delivery_town" required>
</div>
</div>
<div class="form-group row">
<label for="delivery-post-code" class="col-sm-4 col-form-label">Post code</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="delivery-post-code" name="delivery_post_code" required>
</div>
</div>
<div class="form-group row">
<label for="delivery-country" class="col-sm-4 col-form-label">Country</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="delivery-country" name="delivery_country" required>
</div>
</div>
<div class="form-group row">
<label for="delivery-phone-number" class="col-sm-4 col-form-label">Phone No.</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="delivery-phone-number" name="delivery_phone_number" required>
</div>
</div>
</div>
</div>
<div class="form-group row mt-3">
<label for="number-of-items" class="col-sm-2 col-form-label">No. of Items</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="number-of-items" name="number_of_items" required>
</div>
</div>
<div class="form-group row">
<label for="weight" class="col-sm-2 col-form-label">Weight</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="weight" name="weight" required>
</div>
</div>
<div class="form-group row">
<label for="height" class="col-sm-2 col-form-label">Height</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="height" name="height" required>
</div>
</div>
<div class="form-group row">
<label for="length" class="col-sm-2 col-form-label">Length</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="length" name="length" required>
</div>
</div>
<div class="form-group row">
<label for="width" class="col-sm-2 col-form-label">Width</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="width" name="width" required>
</div>
</div>
<div class="form-group row">
<label for="service" class="col-sm-2 col-form-label">Service</label>
<div class="col-sm-10">
<select id="service" class="form-control" name="service" required>
<option value="">Choose...</option>
<option value="UK Overnight">UK Overnight</option>
<option value="International">International</option>
<option value="Chauffeur Service">Chauffeur Service</option>
<option value="Removals">Removals</option>
<option value="Parcels/Pallets">Parcels/Pallets</option>
<option value="Same Day Delivery">Same Day Delivery</option>
</select>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label for="additional-collection-notes">Additional Collection Notes</label>
<textarea name="additional_collection_notes" id="additional-collection-notes" cols="30" rows="3"></textarea>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="additional-delivery-notes">Additional Delivery Notes</label>
<textarea name="additional_delivery_notes" id="additional-delivery-notes" cols="30" rows="3"></textarea>
</div>
</div>
</div>
<div style="margin-top: 2rem;">
<button class="custom-btn themestek-vc_general themestek-vc_btn3 themestek-vc_btn3-size-md themestek-vc_btn3-shape-square themestek-vc_btn3-style-flat themestek-vc_btn3-weight-yes themestek-vc_btn3-color-skincolor">SUBMIT</button>
</div>
</div>
</form>
</div>
First time ever I solved the problem of my post before someone else :)
It seems there is some code hidden in :before and :after elements inside the rows. Therefore, this causes some issues in Safari web browsers.
I embedded this CSS code onto my page inside the style tag and it worked.
.row:before, .row:after {display: none !important;
New modified code
<style>
.row:before, .row:after {display: none !important;}
</style>
<div class="rates-form-shortcode mt-5">
<div class="text-center">
<strong style="font-weight: bolder;"><h5><u style="font-weight: 900;">BOOK A JOB</u></h5></strong>
</div>
<?php if (isset($_GET['success']) && !empty($_GET['success']) && $_GET['success'] == 'true'): ?>
<div class="custom-alert-success alert alert-success mt-3" role="alert">
Job has been booked successfully.
</div>
<?php endif; ?>
<form action="<?php echo admin_url('admin-post.php'); ?>" method="POST">
<input type="hidden" name="action" value="ccdjps_submit_rates_form">
<input type="hidden" name="rate_form_subject" value="<?php echo $atts['subject']; ?>">
<input type="hidden" name="form_refferer" value="<?php echo get_permalink(); ?>">
<div class="input-body mt-5">
<div class="form-group row">
<label for="date" class="col-sm-2 col-form-label">Date</label>
<div class="col-sm-10">
<input type="text" class="form-control datepicker" id="date" name="date" required>
</div>
</div>
<div class="form-group row">
<label for="job-reference" class="col-sm-2 col-form-label">Job Reference</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="job-reference" name="job_reference" required>
</div>
</div>
<div class="collection-delivery-row row mt-4">
<div class="col-sm-6">
<div class="text-center mb-3">
<h6 style="font-weight: bold;">Collection Address</h6>
</div>
<div class="form-group row">
<label for="collection-full-name" class="col-sm-4 col-form-label">Full Name</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="collection-full-name" name="collection_full_name" required>
</div>
</div>
<div class="form-group row">
<label for="collection-address-line-1" class="col-sm-4 col-form-label">Address Line 1</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="collection-address-line-1" name="collection_address_line_1" required>
</div>
</div>
<div class="form-group row">
<label for="collection-address-line-2" class="col-sm-4 col-form-label">Address Line 2</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="collection-address-line-2" name="collection_address_line_2">
</div>
</div>
<div class="form-group row">
<label for="collection-address-line-3" class="col-sm-4 col-form-label">Address Line 3</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="collection-address-line-3" name="collection_address_line_">
</div>
</div>
<div class="form-group row">
<label for="collection-town" class="col-sm-4 col-form-label">Town</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="collection-town" name="collection_town" required>
</div>
</div>
<div class="form-group row">
<label for="collection-post-code" class="col-sm-4 col-form-label">Post code</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="collection-post-code" name="collection_post_code" required>
</div>
</div>
<div class="form-group row">
<label for="collection-country" class="col-sm-4 col-form-label">Country</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="collection-country" name="collection_country" required>
</div>
</div>
<div class="form-group row">
<label for="collection-phone-number" class="col-sm-4 col-form-label">Phone No.</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="collection-phone-number" name="collection_phone_number" required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="text-center mb-3">
<h6 style="font-weight: bold;">Delivery Address</h6>
</div>
<div class="form-group row">
<label for="delivery-full-name" class="col-sm-4 col-form-label">Full Name</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="delivery-full-name" name="delivery_full_name" required>
</div>
</div>
<div class="form-group row">
<label for="delivery-address-line-1" class="col-sm-4 col-form-label">Address Line 1</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="delivery-address-line-1" name="delivery_address_line_1" required>
</div>
</div>
<div class="form-group row">
<label for="delivery-address-line-2" class="col-sm-4 col-form-label">Address Line 2</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="delivery-address-line-2" name="delivery_address_line_2">
</div>
</div>
<div class="form-group row">
<label for="delivery-address-line-3" class="col-sm-4 col-form-label">Address Line 3</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="delivery-address-line-3" name="delivery_address_line_3">
</div>
</div>
<div class="form-group row">
<label for="delivery-town" class="col-sm-4 col-form-label">Town</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="delivery-town" name="delivery_town" required>
</div>
</div>
<div class="form-group row">
<label for="delivery-post-code" class="col-sm-4 col-form-label">Post code</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="delivery-post-code" name="delivery_post_code" required>
</div>
</div>
<div class="form-group row">
<label for="delivery-country" class="col-sm-4 col-form-label">Country</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="delivery-country" name="delivery_country" required>
</div>
</div>
<div class="form-group row">
<label for="delivery-phone-number" class="col-sm-4 col-form-label">Phone No.</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="delivery-phone-number" name="delivery_phone_number" required>
</div>
</div>
</div>
</div>
<div class="form-group row mt-3">
<label for="number-of-items" class="col-sm-2 col-form-label">No. of Items</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="number-of-items" name="number_of_items" required>
</div>
</div>
<div class="form-group row">
<label for="weight" class="col-sm-2 col-form-label">Weight</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="weight" name="weight" required>
</div>
</div>
<div class="form-group row">
<label for="height" class="col-sm-2 col-form-label">Height</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="height" name="height" required>
</div>
</div>
<div class="form-group row">
<label for="length" class="col-sm-2 col-form-label">Length</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="length" name="length" required>
</div>
</div>
<div class="form-group row">
<label for="width" class="col-sm-2 col-form-label">Width</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="width" name="width" required>
</div>
</div>
<div class="form-group row">
<label for="service" class="col-sm-2 col-form-label">Service</label>
<div class="col-sm-10">
<select id="service" class="form-control" name="service" required>
<option value="">Choose...</option>
<option value="UK Overnight">UK Overnight</option>
<option value="International">International</option>
<option value="Chauffeur Service">Chauffeur Service</option>
<option value="Removals">Removals</option>
<option value="Parcels/Pallets">Parcels/Pallets</option>
<option value="Same Day Delivery">Same Day Delivery</option>
</select>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label for="additional-collection-notes">Additional Collection Notes</label>
<textarea name="additional_collection_notes" id="additional-collection-notes" cols="30" rows="3"></textarea>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="additional-delivery-notes">Additional Delivery Notes</label>
<textarea name="additional_delivery_notes" id="additional-delivery-notes" cols="30" rows="3"></textarea>
</div>
</div>
</div>
<div style="margin-top: 2rem;">
<button class="custom-btn themestek-vc_general themestek-vc_btn3 themestek-vc_btn3-size-md themestek-vc_btn3-shape-square themestek-vc_btn3-style-flat themestek-vc_btn3-weight-yes themestek-vc_btn3-color-skincolor">SUBMIT</button>
</div>
</div>
</form>
</div>

Div class row render differently on chrome and firefox

I have a problem with <div>, as you can see :
firefox display:
chrome display:
html structure :
<div class="row">
<div class="form-group col-xs-12 col-sm-4">
<input type="text" name="from_area" class="form-control input-lg typeahead typeahead-area-tariff" id="from_area" placeholder="Origin" />
</div>
<div class="form-group col-xs-12 col-sm-4">
<input type="text" name="to_area" class="form-control input-lg typeahead typeahead-area-tariff" id="to_area" placeholder="Destination" />
</div>
<div class="form-group col-xs-12 col-sm-4">
<div class="input-group">
<input type="number" name="weight" class="form-control input-lg" id="weight" placeholder="Weight" />
<span class="input-group-addon">Kg</span>
</div>
</div>
<div class="form-group col-xs-12 col-sm-4">
<div class="input-group">
<input type="number" name="length" class="form-control input-lg" id="length" placeholder="Length" />
<span class="input-group-addon">Cm</span>
</div>
</div>
<div class="form-group col-xs-12 col-sm-4">
<div class="input-group">
<input type="number" name="width" class="form-control input-lg" id="width" placeholder="Width" />
<span class="input-group-addon">Cm</span>
</div>
</div>
<div class="form-group col-xs-12 col-sm-4">
<div class="input-group">
<input type="number" name="height" class="form-control input-lg" id="height" placeholder="Height" />
<span class="input-group-addon">Cm</span>
</div>
</div>
<div class="form-group col-xs-12 col-sm-4 col-sm-offset-4 text-center">
<button type="submit" class="btn btn-primary btn-lg btn-block" tabindex="7"><span class="fi flaticon-search"></span> Search </button>
</div>
</div>
I am using <div class="col-sm-4"> but when I see it on firefox, input text "Width" breaks to a new line. Please help :(
[SOLVED] Added <div class="clearfix"></div> after the third input text.
Reference

Bootstrap changing keyboard tab key behavior to horizontal

Due to the boot strap design, the keyboard tab key is working vertically(col wise) instead of horizontally.
Can I make the keyboard tab key behavior horizontal(default behavior) without changing the design
This is the section of code.
<div class="col-md-4">
<div class="form-group col-md-12">
<span class="col-md-6">
<select ng-model="typeId" required=""><option value="" class="" selected="selected">--SELECT--</option>
<option label="Employment" value="number:2">Employment</option>
<option label="Female" value="number:3">Female</option>
<option label="Food" value="number:4">Food</option>
<option label="Male" value="number:1">Male</option>
</select>
</span>
</div>
<div class="form-group col-md-12" ">
<span class="col-md-6">
<input type="text" name="nameAr" required="" ng-maxlength="250">
</span>
</div>
<div class="form-group col-md-12">
<span class="col-md-6">
<select ng-model="nId" ng-options="non.nId as non.nlity for non in List" ng-invalid-required" name="nationality" id="nationality" required="">
</select>
</span>
</div>
<div class="form-group col-md-12">
</div>
<div class="form-group col-md-12">
<label class="col-md-6" for="profession">Profession:</label>
<span class="col-md-6">
<select ng-model="rpationId" ng-options="ocp.rpationId as ocp.occupation for ocp in occupationList" >\
</select>
</span>
</span>
</div>
</div>
<div class="col-md-4">
<div class="form-group col-md-12" ng-class="{ 'has-error' : regCtrl.userForm.mmpId.$invalid && regCtrl.userForm.mmpId.$dirty }">
<label class="col-md-6" for="mmpId">MMP Id: *</label>
<span class="col-md-6">
<input type="text" name="mmpId" class="form-control ">
</span>
<div class="col-sm-6 error-color ng-scope ng-active" >
<span ng-message="required" class="ng-scope">This field is required</span>
</div>
</div>
<div class="form-group col-md-12" >
<label class="col-md-6" for="name">Name: *</label>
<span class="col-md-6">
<input type="text" name="name" ng-maxlength="250">
</span>
</div>
<div class="form-group col-md-12" >
<label class="col-md-6" for="dob">Date of Birth: *</label>
<span class="col-md-6">
<input type="date" name="dob" ng-maxlength="11">
</span>
</div>
<div class="form-group col-md-12" ng-class="">
<label class="col-md-6" for="contactNo">Contact No: *</label>
<span class="col-md-6">
<input type="number" name="contactNo" required="">
</span>
</div>
</div>
This is because of your grouping of the form elements. You are grouping the elements column wise hence the tab works column wise.
You have grouped 4 form elements in first col-md-4 and the next 4 in the second col-md-4 so default tab control will first cover first col-md-4 elements and then the next col-md-4 elements.
Either use tabindex or change your layout to row wise as below:
<div class="row">
<div class="col-md-4">
<div class="form-group col-md-12">
<input type="text" name="nameAr" required="" ng-maxlength="250">
</div>
</div>
<div class="col-md-4">
<div class="form-group col-md-12">
<input type="text" name="nameAr" required="" ng-maxlength="250">
</div>
</div>
<div class="col-md-4">
<div class="form-group col-md-12">
<input type="text" name="nameAr" required="" ng-maxlength="250">
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group col-md-12">
<input type="text" name="nameAr" required="" ng-maxlength="250">
</div>
</div>
<div class="col-md-4">
<div class="form-group col-md-12">
<input type="text" name="nameAr" required="" ng-maxlength="250">
</div>
</div>
<div class="col-md-4">
<div class="form-group col-md-12">
<input type="text" name="nameAr" required="" ng-maxlength="250">
</div>
</div>
</div>
Hope it helps.

Bootstrap input-group removes padding from col-XX-X

I'm trying to create a form that includes an input-group. I use the 'col'-classes of bootstrap to style it, but when this is combined with the 'input-group'-class, the padding of the columns are removed.
I would like the date and name input-field to be aligned.
Here is my JSFiddle
HTML
<div class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 col-xs-2 control-label">Date</label>
<div class="col-sm-4 col-xs-4 input-group">
<input type="text" class="form-control" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 col-xs-2 control-label">Name</label>
<div class="col-sm-4 col-xs-4">
<input type="text" class="form-control" />
</div>
</div>
</div>
<br><br>
<div class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 col-xs-2 control-label">Date</label>
<div class="col-sm-4 col-xs-4">
<input type="text" class="form-control" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 col-xs-2 control-label">Name</label>
<div class="col-sm-4 col-xs-4">
<input type="text" class="form-control" />
</div>
</div>
</div>
Any help is appreciated!
The input-group class should not be combined with any other, as indicated in their examples (http://getbootstrap.com/components/#input-groups):
<div class="row">
<div class="col-lg-6">
<div class="input-group">
[...]
</div>
</div>
</div>
Try this:
<div class="form-group">
<label class="col-sm-2 col-xs-2 control-label">Date</label>
<div class="col-sm-4 col-xs-4">
<div class="input-group">
<input type="text" class="form-control" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
</div>

Bootstrap 3 panel header pull-right buttons to create advance search

I want to use bootstrap panel to create advance search design.
Like in this image:
My HTML is this:
<div class="panel panel-primary aplxpert-distanta-sus" id="Antet">
<div class="panel-heading clearfix">
<h3 class="panel-title pull-left aplxpert-distanta-sus">Test List</h3>
<div class="btn-group pull-right">
<div class="row form-inline">
<div class="form-group col-sm-12">
<label class="col-sm-2 control-label aplxpert-distanta-sus" for="Nume">Search:</label>
<div class="col-sm-8">
<div class="input-group">
<input type="text" class="form-control input-sm" placeholder="name......" id="cauta">
<span class="input-group-btn">
<button title="Click for search" type="button" class="btn btn-info btn-sm">
<i class="glyphicon glyphicon-search"></i>
</button>
</span>
</div>
</div>
<div class="col-sm-1">
<a title="Advance Search" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" class="btn btn-default btn-sm">
<i class="glyphicon glyphicon-chevron-down"></i>
</a>
</div>
</div>
</div>
</div>
</div>
<div id="collapseOne" class="panel-body panel-collapse collapse">
<div class="row">
<div class="col-sm-3">
<div class="form-group">
<label for="Nume" class="control-label">Nume:</label>
<input type="text" name="Nume" id="Nume" class="form-control input-sm">
</div>
<div class="form-group">
<label for="Prenume" class="control-label">Prenume:</label>
<input type="text" name="Prenume" id="Prenume" class="form-control input-sm">
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label for="Nume" class="control-label">Nume aa:</label>
<input type="text" name="Nume" id="Nume" class="form-control input-sm">
</div>
<div class="form-group">
<label for="Prenume" class="control-label">Prenume aa:</label>
<input type="text" name="Prenume" id="Prenume" class="form-control input-sm">
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label for="Nume" class="control-label">Nume bb:</label>
<input type="text" name="Nume" id="Nume" class="form-control input-sm">
</div>
<div class="form-group">
<label for="Prenume" class="control-label">Prenume bb:</label>
<input type="text" name="Prenume" id="Prenume" class="form-control input-sm">
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label for="Nume" class="control-label">Nume cc:</label>
<input type="text" name="Nume" id="Nume" class="form-control input-sm">
</div>
<div class="form-group">
<label for="Prenume" class="control-label">Prenume cc:</label>
<input type="text" name="Prenume" id="Prenume" class="form-control input-sm">
</div>
</div>
</div>
</div>
<div class="panel-footer">
<strong>Result return for this criterias:</strong> nume: Popescu Ion, data: 04.05.2014, CNP: 1361813282206
</div>
</div>
Something like this: http://jsfiddle.net/nkS2e/4/
How i can do this more better because on resize not work good and in not the best way.