Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7646187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:08:37+00:00 2026-05-31T10:08:37+00:00

After reading the answer which suggested I use Simple_form gem with bootstrap integration, I

  • 0

After reading the answer which suggested I use Simple_form gem with bootstrap integration, I installed it and created my form according to simple_form instructions, but the input boxes are floating right.

This is the layout. The form is being called with the partial ‘shared/reg’

 <div class="container">

  <div class="row">
   <div class="span8"><%= yield %></div>
   <div class="span4">
   <%= render 'shared/reg' %>
   </div>

  </div>
</div>

This is my simple form form

<%= simple_form_for("user", :url => main_app.user_registration_path, :html => { :class => "form-horizontal" } ) do |f| %>
  <%= f.input :name %>
<%= f.input :vote, :collection => [ "For", "Against", "Undecided"] %>
  <%= f.input :country,  :collection => [ "Canada", "Iceland", "Other"] %>
  <%= f.input :email %>
   <%= f.input :image, :as => :file %>
    <%= f.input :password %>
  <%= f.input :password_confirmation %>
 <%= f.button :submit %>
<% end %>

Below you can see how the input boxes are floating right in relation to the submit button.

Update

enter image description here
enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T10:08:38+00:00Added an answer on May 31, 2026 at 10:08 am

    You should try the following:

    <%= form_for("user", :url => main_app.user_registration_path, :html => { :class => "form-horizontal" } ) do |f| %>
    <fieldset>
      <legend>User Registration</legend>
    
      <div class="control-group">
        <%= f.label :name, class: "control-label" %>
        <div class="controls">
          <%= f.text_field :name %></p>
        </div>
      </div>
    
      <div class="form-actions">
        <%= f.submit %>
      </div>
    </fieldset>
    

    Note that the bootstrap uses some specific selectors for some classes / html elements, so that if you forget to add an element or a class, everything else will be messed up… In this aspect there’s no leeway.

    On a side note, you should definitely try simple_form, and the bootstrap integration. It will make your life easier.

    Update:

    <%= simple_form_for("user", :url => main_app.user_registration_path, :html => { :class => "form-horizontal" } ) do |f| %>
    <fieldset>
      <legend>User Registration</legend>
    
      <%= f.input :name %>
      <%= f.input :vote, :collection => [ "For", "Against", "Undecided"] %>
      <%= f.input :country,  :collection => [ "Canada", "Iceland", "Other"] %>
      <%= f.input :email %>
      <%= f.input :image, :as => :file %>
      <%= f.input :password %>
      <%= f.input :password_confirmation %>
    
      <div class="form-actions">
        <%= f.submit %>
      </div>
    </fieldset>
    <% end %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question came to mind after reading the answer to this question; which basically
After reading this answer: best way to pick a random subset from a collection?
At my workplace I'm stuck with Visual Basic 6, but after reading the answer
After reading this question , i saw the answer by Naveen containing a link
After reading the answers to the question Calculate Code Metrics I installed the tool
What is Lazy Loading? [Edit after reading a few answers] Why do people use
(Title and contents updated after reading Alex's answer) In general I believe that it's
Ok so after reading danben's answer on this post , I guess I'm convinced
I have a feeling the answer is no after reading through documentation. However, I
An hour ago I posted an answer here which according to me was correct.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.