Re: Digest for plataformatec-simpleform@googlegroups.com - 6 Messages in 3 Topics

9 views
Skip to first unread message

Mark Bratcher

unread,
Sep 29, 2012, 9:13:43 AM9/29/12
to plataformate...@googlegroups.com
Have you tried using the :wrapper_tag option for your inputs? It works in the latest version of simple_form:

    <%= f.input :name, :wrapper_tag => :span %>
    <%= f.input :maxguests, label: 'Maximum Guests', :collection 
    => 1..11, :wrapper_tag = :span %>
Does that work for you? Otherwise, the table idea that Javier mentioned works well, too. I've used it many times.

Mark

On Sat, Sep 29, 2012 at 12:28 AM, <plataformate...@googlegroups.com> wrote:

Group: http://groups.google.com/group/plataformatec-simpleform/topics

    Tim Reistetter <treis...@gmail.com> Sep 28 07:39PM -0700  

    I've been googling forever, and this seems like such a simple problem. My
    form is this:
     
    <%= simple_form_for @roomtype do |f| %>
    <%= f.input :name %>
    <%= f.input :maxguests, label: 'Maximum Guests', :collection
    => 1..11 %>
    <%= f.button :submit, 'Add Room Type' , :class => 'btn
    btn-primary', :type => 'submit' %>
    <% end %>
     
    What do I need to do so that those two inputs show up next to eachother? I
    know that boot strap has a horizontal form, but I want a more general
    solution where I can say that in a form, these two inputs will be next to
    each other? I tried using the .controls-row class option, but it didn't
    seem to do anything. I'd love any help.

     

    Javier Quarite <jqua...@gmail.com> Sep 28 10:04PM -0500  

    > solution where I can say that in a form, these two inputs will be next to
    > each other? I tried using the .controls-row class option, but it didn't
    > seem to do anything. I'd love any help.
     
    Once a wrapped the entire form with a table and each input as a td of a
    tr... maybe there's another way using <div class="row> and wrapping the
    inputs with spans


Reply all
Reply to author
Forward
0 new messages