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

  • Home
  • SEARCH
  • 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 9199929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:39:04+00:00 2026-06-17T22:39:04+00:00

Per the docs I have tried many variations, but none seem to work. What

  • 0

Per the docs I have tried many variations, but none seem to work.

What I would like to happen is this:

<form accept-charset="UTF-8" action="/listings" class="simple_form new_listing form-horizontal" id="new_listing" method="post" novalidate="novalidate">

But when I tried this:

  <%= simple_form_for @listing, :defaults => { :class => 'form-horizontal' } do |f| %>

This is generated:

<form accept-charset="UTF-8" action="/listings" class="simple_form new_listing" id="new_listing" method="post" novalidate="novalidate">

Notice no form-horizontal in the class attribute.

When I try:

  <%= simple_form_for @listing, :defaults => { :wrapper_html => { :class => 'form-horizontal' } } do |f| %>

This is the output generated:

<form accept-charset="UTF-8" action="/listings" class="simple_form new_listing" id="new_listing" method="post" novalidate="novalidate">

It also applies that class to all the elements within the form, e.g.:

<div class="control-group select optional form-horizontal">

Which is not the outcome I want.

I also tried this:

  <%= simple_form_for @listing, :defaults => { :input_html => { :class => 'form-horizontal' } } do |f| %>

This is the form output it produced:

<form accept-charset="UTF-8" action="/listings" class="simple_form new_listing" id="new_listing" method="post" novalidate="novalidate">

Which looks just like some of the other outputs, but the difference is that it applied that class to all input elements within the form, like this:

<input class="numeric float optional form-horizontal">

So….I have tried everything I can think of, and everything seen in the docs (I think).

What have I missed?

Thanks.

Edit 1:

I also tried the obvious, ‘normal’ version:

<%= simple_form_for @listing, :class => 'form-horizontal' do |f| %>

That generates this:

<form accept-charset="UTF-8" action="/listings" class="simple_form new_listing" id="new_listing" method="post" novalidate="novalidate">
  • 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-06-17T22:39:06+00:00Added an answer on June 17, 2026 at 10:39 pm
    <%= simple_form_for @listing, :html => { :class => 'form-horizontal' } do |f| %>
    

    That doesn’t work?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried this a few ways. Per the docs , I have done
Using AmazonSimpleEmailServiceClient.sendEmail() ; as per java docs All service calls made using this client
've registered xdebug in php.ini (as per http://xdebug.org/docs/install ) but it's not showing up
As per the android developer docs for creating tab UI you need to have
I have a spreadsheet (in Google Docs, but can be any spreadsheet) with a
I have set up TinyMCE to work with the Admin panel (as per the
As per the docs,it expects this file in a folder named 'registration' in templates
I have a model like the following: class Page(ContentBase): url_slug = models.SlugField() Per the
I'm trying to install acts_as_audited on rails 3, but the docs seem to only
Equal Objects must have equal hashcodes. As per my understanding this statement is valid

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.