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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:12:09+00:00 2026-05-31T11:12:09+00:00

[Solution: Change my names to arrays by concatenating [] to the end. Also, change

  • 0

[Solution: Change my names to arrays by concatenating “[]” to the end. Also, change my IDs to be unique values to conform to HTML specifications]

I’m creating a form, that has a matrix (html table) of checkboxes with one user per row, and user permissions on the columns. Each cell has a checkbox. Each checkbox in a row has the “name” set to the user’s email address (unique). The values of the checkboxes are the IDs of the particular permission. when I click the submit button, and inspect the params I get back from the HTTP POST, only the right-most checkbox is set for rows that have multiple boxes checked.

For example, there are three checkboxes, first and second checked, third unchecked. I only get back the name=id of that second checkbox.

I’m building the form in Rails, although I don’t believe that to be relevant really. Also, the browser that’s giving this behavior is Chrome, Iceweasel, and Epiphany… So I think it’s my form.

An excerpt of my form:

<tr>
                <td>UserOne</td>
                <td>one@oreo.com</td>
                <td>
                        <input checked="checked" id="one_oreo.com" name="one@oreo.com" type="checkbox" value="1" />
                </td>
                <td>
                        <input id="one_oreo.com" name="one@oreo.com" type="checkbox" value="2" />
                </td>
                <td>
                        <input id="one_oreo.com" name="one@oreo.com" type="checkbox" value="3" />
                </td>
                <td>
                        <input checked="checked" id="one_oreo.com" name="one@oreo.com" type="checkbox" value="4" />
                </td>
                <td>
                        <input id="one_oreo.com" name="one@oreo.com" type="checkbox" value="5" />
                </td>
                <td>
                        <input id="one_oreo.com" name="one@oreo.com" type="checkbox" value="6" />
                </td>
            </tr>
  • 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-31T11:12:11+00:00Added an answer on May 31, 2026 at 11:12 am

    You have set the name=”” on all of them to the same thing, so it is going to replace whatever value was originally there when you tick more than one checkbox.

    Either give each checkbox a different name e.g. name="one@oreo.com_check_1" or turn them in to an array using name="one@oreo.com[]" This will then store all values passed to it in an array that you can then process after the form has been submitted!

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

Sidebar

Related Questions

I don't want to change the entire background color of solution explorer in VS,
After trying out VS2010b2 also my VS2008 installation changes the versions of solution and
Solution: I had also moved ashx and asmx files at the same time as
I have an array of object names. These objects are HTML elements. I want
I have an HTML form which contains a drop down, a tinyMCE textarea, and
Solution: if you have the same problem, addElement() instead of addChild() is what did
Solution: strpos turned out to be the most efficient. Can be done with substr
Solution is called Portal which holds Areas/CMS/Login folder inside it. Login controller in CMS/Controllers
Solution Edit: Turns out you can't use the PHP SDK to return the correct
Edited: SOLUTION FOUND. This is strange and not the best solution, but I just

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.