Use SELECT instead of radio buttons to choose group
Junyor - April 28, 2007 - 19:49
| Project: | Organic Groups Mandatory Group |
| Version: | 5.x-1.0-beta |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Jump to:
Description
We have a *ton* of groups and using radio buttons to choose the mandatory group just isn't practical. I've switched the settings page to use a SELECT instead.
| Attachment | Size |
|---|---|
| og_man_group.patch | 1.69 KB |

#1
Look at the code in og.module- there is a switch between checkboxes and a multi-select based on the number of groups shown (cutoff at 20 I think). Can you code it that way instead?
#2
Also, what did you take the cehck_plain off the group title? This should be there to prevent XSS.
- $options[$group->nid] = check_plain($group->title);+ $options[$group->nid] = $group->title;
#3
Though I think perhaps, on second though, it's not needed since the forms API already runs a check_plain() on all the options.
#4
The check_plain was mangling group titles containing double quotes, if I'm not mistaken. It was turning them into HTML entities.
#5
Ok, can you submit a patch with the swtich between checkboxes and multi-select based on # of groups?
#6
Yes, I will, but it may be a couple weeks.
#7
+1 to this, I need this functionality
#8
I'm waiting for the patch...
#9
FYI, I'm no longer working on the project that used this functionality and I don't plan to update the attached patch.