-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bootstrap-2.0 inputs have wrappers? #56
Comments
Are you using Twitter Bootstrap 2? |
Sure am yeah. |
Use the bootstrap-2.0 branch. I need to fix a few remaining bugs and gemify it, but it should work. |
That's the branch I'm using? At least I should be? Certainly the output it's producing is in line with bootstrap-2.0 apart from the extra span. I'll grab it again and re-install and see if it helps |
Ah, apologies. Have had a lot of bug reports from people still using the 1.3-compatible version. Can I see the full code for the form? You're missing the |
Ah fair enough. yeah sure thing, here you go
<%= twitter_bootstrap_form_for @CareHome, :html => { :class => "form-horizontal" } do |home| %>
<%= home.fieldset do %>
<div class="page-header">
<h1>Sign Up <small>Register your care home</small></h1>
</div>
<%= home.text_field :home_name, :class => 'span3', :placeholder => "The name of your care home" %>
<%= home.label 'Name' do |controls| %>
<%= controls.text_field :home_name, :class => 'span3', :placeholder => "The name of your care home" %>
<% end %>
<%= home.label 'Homepage' do |controls| %>
<%= controls.text_field :home_name, :class => 'span2', :placeholder => "The home page you would like", :add_on => :append do %>
<span class="add-on">.euphoricare.com</span>
<% end %>
<% end %>
<%= home.label 'Address' do |controls| %>
<%= controls.text_field :home_name, :class => 'span3', :placeholder => "Building name/number" %>
<%= controls.text_field :home_name, :class => 'span3', :placeholder => "Road" %>
<%= controls.text_field :home_name, :class => 'span3', :placeholder => "Town" %>
<%= controls.text_field :home_name, :class => 'span3', :placeholder => "County" %>
<%= controls.text_field :home_name, :class => 'span2', :placeholder => "Postcode" %>
<% end %>
<%= home.actions do %>
<%= home.submit 'Sign Up'%>
<% end %>
<% end %>
<% end %> I realise the form names are all the same but I'm just testing around with stuff |
Looks reasonable to me. I'll try and figure out what's going on tonight. At work right now. |
That'd be fantastic thanks! I'm glad I'm not just doing something stupid. No hurry though, I can work around it for now :) |
I'm trying to use this gem and I'm having a few minor issues with the markup that is being produced.
I'm using the following code :
Which is producing nearly the right format, however each of the input tags are being wrapped in a span with a class of input. So for example
As a result, the bootstrap styling breaks and doesn't work the way it's meant to work.
Is there any easy way to get rid of this or disable this?
Thanks
The text was updated successfully, but these errors were encountered: