How to use plain bootstrap forms?

antage edited this page Apr 21, 2012 · 2 revisions
Clone this wiki locally

You can't import bootstrap/forms in global namespace because it conficts with formtastic class-names. However you can import it in local namespace.

Look at example with .form-search:

app/views/examples/example.html:

<div class="bootstrap-forms">
  <form class="form-search">
    <input type="text" class="input-medium search-query">
    <button type="submit" class="btn">Search</button>
  </form>
</div>
...

app/assets/stylesheets/application.css.scss:

/*
 *= require bootstrap-without-forms
 *= require formtastic-plus-bootstrap
 *= require_self
*/

@import "bootstrap/variables";
@import "bootstrap/mixins";

.bootstrap-forms {
  @import "bootstrap/forms";
}