amitech / dropdown-check-list

Automatically exported from code.google.com/p/dropdown-check-list
0 stars 0 forks source link

forceMultiple #213

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
** What steps will reproduce the problem?
add the parameter forceMultiple: false

** What is the expected output? What do you see instead?
The user can only select one checkbox. 
I see a radio dropdown, which is ok since the user can only select one, but 
this way the user can't deselect once he selected something.

** What is your environment?
-- DropDownCheckList version: 1.4
-- jQuery version: 1.6.4
-- jQuery UI version: 1.8.16
-- Browser and version: firefox 7.0.1

Original issue reported on code.google.com by de...@galeola.com on 19 Oct 2011 at 9:08

GoogleCodeExporter commented 8 years ago
I am not quite sure what you are asking for here. 'forceMultiple:true' is 
designed to override the setting on the source <SELECT> to treat it like a 
multiple select in all cases.  'forceMultiple:false' has no current meaning in 
DDCL.

Are you asking for an enhancement to do something that DDCL does not currently 
support?

Original comment by womohun...@ittrium.com on 19 Oct 2011 at 2:29

GoogleCodeExporter commented 8 years ago
(still me from another account)

I guess it's an enhancement. I was thinking the solution would be to change the 
radios into checkboxes, but only allow one to be selected at a time.

The way i kind of fixed it for now was to reset the form and refresh the 
plugin, but it would be nice if this was more user friendly(for the user)

Original comment by maxim.po...@gmail.com on 19 Oct 2011 at 4:04

GoogleCodeExporter commented 8 years ago
You can use the callback mechanism to limit the number of items that the user 
can click.  It sounds like 'forceMultiple' does not come into play at all.  You 
still want a list of checkboxes, not radio buttons, but you have a limit (even 
if that limit is one)

See the sample on the Demo page for "Callback handling for both single item 
click and when the user completes their selection"  It imposes a limit of 
three, but you can easily change that one.  Hope this helps.

Original comment by womohun...@ittrium.com on 19 Oct 2011 at 4:49