Skip to main content
Inspiring
November 16, 2008
Question

Checkbox - multiple values with same name

  • November 16, 2008
  • 2 replies
  • 277 views
I have a cfoutput from a query and within that I have a <cfinput type="checkbox" name ="GroupID" value ="#Query.GroupID#"> to input the GroupID value from any checked checkbox.

It passes all of the values from the checked boxes, but without the comma between the values. I end up with one string with "GroupIDGroupIDGroupID". I am 99% sure that this worked on CF7, but am now running CF8 and Dreamweaver 8.

From what I've seen in a bunch of forums, this procedure should create "GroupID,GroupID,GroupID".

Any ideas?
    This topic has been closed for replies.

    2 replies

    Inspiring
    November 17, 2008
    Problem discovered. Turns out that one of our housekeeping modules was doing a CFSET to NumbersOnly on the GroupID fields because they must be numeric, which of course removed the commas. I changed the CFSET to do a StripAllBut(form.Group.ID, "1234567890,",false) and it works fine.

    Amazing how a change to fix one problem can come back to haunt you months later.
    Inspiring
    November 17, 2008
    yeah, that should work... and it does for me...
    post your code that creates the checkboxes - something must be wrong
    with that...


    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/