I have a large list of event types and I allow multiple selection from taxonomy.
Could the Subscribe page be formattes with a checkbox group in place of taxonomies default list.
Novice members have a hard time selecting multiple categories whereas a list of checkboxes would make it easy for them
how do you rewrit this code?
foreach($vocs as $key => $voc) {
$form .= _taxonomy_term_select($voc->name, 'taxonomy', $selected, $key, t('Select the terms for which you wish to receive reminders via email.'), 1, NULL);
}
into something else?
foreach($vocs as $key => $voc) {
$group .= form_checkbox($lists->name, 'taxonomy', $selected, $key, t('Select the terms for which you wish to receive reminders via email.'), 1, NULL);
$form .= form_group(t('See list below, Testing reformat'), $group);
That code returms a single box with the top of the taxonomy tree
I also have events listed by ZipCode and want to limit sending events to members with a 100 mile radius.
Comments
Comment #1
nevets commentedFor the first part look at the _taxonomy_term_select() function (around line 752) for the section
The line with "option value" construction one option for the selection list (put together in the call to form_item
It sound like you want to make an checkbox (<input type=checkbox ...) instead of an option and return the string of checkboxes.
-----
For the zip code question you might want to look at the location module currently in development. I think this may help you (actually I hope so because I have a similiar need, just not there yet)
Steve
Comment #2
killes@www.drop.org commentedThis feature request makes sense. I'd apply a patch if I get one.
Comment #3
killes@www.drop.org commentedThis can be now achieved through hook_form_alter so you can write a contrib module for that..