html - Creating bootstrap form with mixed rows of single input and multiple input in each rows -


i wanted make form looks this:

label1 [input                       ] label2 [dropbox][input         ][btn] arbitrarylabel3 [input                       ] arbitrarylabel4 [input                       ] 

it mixed of horizontal , vertical wanted inputs on label2 using form-inline, rest of forms horizontally aligned. there proper way of doing instead of using col? col class makes inputs form gaps between them when page resized.

edit: here sample minimal code:

<form>   <div class="row">   <div class="form-group">     <label> label 1 </label>     <input type="text" class="form-control">   </div>   </div>   <div class="row">   <div class="form-group">     <label> label 2 </label>       <select class="form-control">         <option selected value="opt1"> opt1 </option>         <option value="opt2"> opt2 </option>       </select>       <input type="text" class="form-control">       <span class="input-group-btn">         <button class="btn btn-default" type="submit">           <span class="glyphicon glyphicon-search"></span>         </button>       </span>   </div>     </div> </form> 

with field examples gave possible use bootstrap's input groups inside type of form layout. supports labels/hints/text, checkboxes, radio buttons, buttons, segmented/grouped/multiple buttons, dropdown buttons, plus 1 "real" form input type.

it doesn't support <textarea> or <select>, or multiple form fields in single row though.

example http://jsfiddle.net/zfachxus/1/

<div class="input-group">      <!-- dropdown button -->     <div class="input-group-btn">         <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">             dropdown <span class="caret"></span>         </button>         <ul class="dropdown-menu">             <!-- add links here -->         </ul>     </div>      <!-- text field -->     <input type="text" class="form-control" placeholder="input box" aria-label="...">      <!-- plain button -->     <span class="input-group-btn">         <button class="btn btn-default" type="button">             button         </button>     </span>  </div> 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -