Checkbox list with same name do not allow multiple selection #1851

Closed
SJai opened this Issue Jun 18, 2011 · 4 comments

Comments

Projects
None yet
5 participants
@SJai

SJai commented Jun 18, 2011

The checkboxradio plugin treats a check box list with same value for the name attribute for the check boxes as radio buttons. Hence the plugin allows to select only one item whereas the expected behavior is to select multiple items. When the checkbox list is rendered as native controls they behave as expected.

To allow multiple selection, as a workaround we have to provide unique names for each checkbox. This adds a extra amount of work at the server side to gather all the selected checkboxes values. If they are posted with same names, we can use the name to get a comma separated list of selected checkboxes values.

Please work on this.

@BrandnameBob

This comment has been minimized.

Show comment
Hide comment
@BrandnameBob

BrandnameBob Jun 21, 2011

I am also experiencing this issue, the problem seems to lie in _getInputSet() within the mobile.checkboxradio widget.

Adding the following as the first line seems to fix it:

         return this.element;

I am also experiencing this issue, the problem seems to lie in _getInputSet() within the mobile.checkboxradio widget.

Adding the following as the first line seems to fix it:

         return this.element;

tbosch pushed a commit to tbosch/jquery-mobile that referenced this issue Jun 27, 2011

@ghost ghost assigned jblas Sep 22, 2011

@agcolom

This comment has been minimized.

Show comment
Hide comment
@agcolom

agcolom Mar 17, 2012

Member

I have created a jsfiddle where I have two sets of checkboxes (one 'normal' and one in a control group): http://jsfiddle.net/agcolom/Au9zy/8/

All checkboxes in the 1st set have the same name. All checkboxes in the 2nd set have the same name (but a different name than the checkboxes in the 1st set). In both sets, I can select none, one or many checkboxes.

So unless I misunderstood what the issue was, it looks fixed :-)
@SJai Did I understand your issue correctly?

Thanks,

Anne

Member

agcolom commented Mar 17, 2012

I have created a jsfiddle where I have two sets of checkboxes (one 'normal' and one in a control group): http://jsfiddle.net/agcolom/Au9zy/8/

All checkboxes in the 1st set have the same name. All checkboxes in the 2nd set have the same name (but a different name than the checkboxes in the 1st set). In both sets, I can select none, one or many checkboxes.

So unless I misunderstood what the issue was, it looks fixed :-)
@SJai Did I understand your issue correctly?

Thanks,

Anne

@agcolom

This comment has been minimized.

Show comment
Hide comment
@agcolom

agcolom Apr 15, 2012

Member

@toddparker I cannot reproduce and had no reply in a month. I suppose we can close.

Member

agcolom commented Apr 15, 2012

@toddparker I cannot reproduce and had no reply in a month. I suppose we can close.

@toddparker

This comment has been minimized.

Show comment
Hide comment
@toddparker

toddparker Apr 16, 2012

Contributor

Closing as fixed but we can reopen if someone chimes in with details.

Contributor

toddparker commented Apr 16, 2012

Closing as fixed but we can reopen if someone chimes in with details.

@toddparker toddparker closed this Apr 16, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment