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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:16:02+00:00 2026-06-11T17:16:02+00:00

I have the following form(truncated) <%= form_for(daysevent, :html => { :class => form-inline} )

  • 0

I have the following form(truncated)

    <%= form_for(daysevent, :html => { :class => "form-inline"} ) do |f| %>
    <fieldset>
    <div class="control-group">
        <%= f.label :start_date, :class => 'control-label' %>
        <div class="controls">
          <%= f.text_field :start_date, 'data-behavior' => 'datepicker1' %>
        </div>
      </div>
      <div class="control-group">
        <%= f.label :end_date, :class => 'control-label' %>
        <div class="controls">
          <%= f.text_field :end_date, 'data-behavior' => 'datepicker2' %>
        </div>
      </div>
    Locations for this date:<br/>
    <% daysevent.event.locations.each do |l|%>         
        <%= check_box_tag 'location_ids[]', l.id, true -%><%= h l.name -%><br/>    
    <% end %> 
    <%= f.submit 'Create Date' %>
    </fieldset>
    <% end %> 

I’m trying to get the list of location checkboxes to come through in an array of IDs but its not working, in my create method return render :text => params[:days_event] is just returning start_date and end_date. I’ve only been doing rails for a few months so its probably something simple but all help his appreciated.

  • 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-11T17:16:03+00:00Added an answer on June 11, 2026 at 5:16 pm

    You are not sending values of checkboxes in the params[:days_event] but in params[:locations_ids]. You can check debug output from rails server and you will see parsed params hash.

    If you want to send them along then change the checkboxes to:

    <%= check_box_tag "days_event[location_ids][]" .... %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following form: <fieldset id=upload-form> <ul> <li> <div class=radio-list clearfix> <ul> <li><label
I have the following form: <form action=post.php method=POST> <fieldset> <div class=ratingClass> <input type=radio class=radio
I have the following form <form id=myform method=post action=#> <div class=fields> <fieldset class=ui-widget ui-widget-content
I have the following form in cakephp: <div class=quickcontactDisplay> <?php echo $form->create('Enquiry',array('action'=>'add','class'=>'quickcontact')); echo $form->hidden('visitor_id',
I have the following form using radio button: <div class=attributes> <div class=attribute attribute-1 odd>
I have the following form: <html> <body> <form action=upload_file.php method=post enctype=multipart/form-data> <label for=file>Filename:</label> <input
I have the following form declaration for a new kindergarten <%= form_for @kindergarten, :html
I have the following form in my edit.html.erb page <%= form_for(@device) do |f| %>
I have the following form: @model Teesa.Models.SearchModel @using (Html.BeginForm(Index, Search, FormMethod.Get, new { id
I have the following form and controller. <%= form_tag do %> <div> <%= label_tag

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.