I don't know why Its not duplicating like the example. When I put the following code to have this form:
<%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :class => "form-horizontal" } ) do |f| %>
<%= f.input :user_name, :input_html => { :class => "span3" }, :hint => "just letters and numbers please." %>
<% end %>
Right now it looks like this:
When I want it to be like this (the first example here: http://simple-form-bootstrap.plataformatec.com.br/articles/new).
The Problem lies in the HTML being generated. My HTML is:
<div class="input string optional">
<label for="user_user_name" class="string optional"> User name</label>
<input type="text" size="50" name="user[user_name]" maxlength="25" id="user_user_name" class="string optional span3">
<span class="hint">no spaces or special characters, just letters and numbers please</span>
</div>
And Simple_forms HTML:
<div class="control-group string required">
<label for="article_name" class="string required">
<abbr title="required">*</abbr> Name
</label>
<div class="controls">
<input type="text" size="50" name="article[name]" id="article_name" class="string required span6">
<p class="help-block">add your article title here</p>
</div>
</div>
Totally different. I'm thinking the Bootstrap generator doesn't generate? What do you think? What should I do?
resources
https://github.com/plataformatec/simple_form
Have you added the initializer for simple_form? this initializer sets the wrappers that should be used to output the bootstrap html
rails generate simple_form:install --bootstrap
Note that this only works with simple_form 2!