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 6638061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:23:24+00:00 2026-05-25T23:23:24+00:00

I am using the simple_form gem (https://github.com/plataformatec/simple_form) to help out the forms in my

  • 0

I am using the simple_form gem (https://github.com/plataformatec/simple_form) to help out the forms in my app. But I’d like to display the many radio buttons I’ve got here in li tag. Simple_form now generates span wrapper tag for each radio buttons. Like this:

 <%= t.input :arrives_in, :collection => [1,2,3,4], :as => :radio %>
 #=> <span><input type='radio'><label>1</label></span> 

any way I can have it wrap the input and label part in an li instead of span?

Thank YOU!

  • 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-25T23:23:25+00:00Added an answer on May 25, 2026 at 11:23 pm

    You can pass :item_wrapper_tag to you input like this:

    <%= t.input :arrives_in, :collection => [1,2,3,4], :as => :radio,
                             :item_wrapper_tag => :li %>
    

    You can also, pass the :collection_wrapper_tag option to change the wrapper of all radio inputs like this:

    <%= t.input :arrives_in, :collection => [1,2,3,4], :as => :radio,
                             :item_wrapper_tag => :li,
                             :collection_wrapper_tag => :ul %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the simple_form gem https://github.com/plataformatec/simple_form to create some input fields; one of
I am using https://github.com/plataformatec/simple_form and am trying to send a extra parameter. I have
Guys. How to I do to using association of the simple_form gem, but do
I'm using simple_form 1.5.2 + rails 3.1 gem in my project, but simple_form generates
I am using Rails 3.0, Ruby 1.9.2 and the Plataformatec simple_form gem. The code
I am using Rails 3.0, Ruby 1.9.2 and the Plataformatec simple_form gem. This code
I am using discogs-wrapper gem to access some music information, but I noticed that
I'm using simple_form gem on a form, and want to use date fields with
I'm making my first Rails project and I'm using the simple_form gem (version 1.0)
So I'm using simple_form for building my forms, this is not a requirement though.

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.