Event Form – Categories as checkboxes
-
Hi, I’ve searched high and low and haven’t been able to find a work around.
I am wondering if there is a way to change the multi-select categories on the event form to checkboxes. I wish to try to make it as easy as possible to be able to select multiple categories without having to hold CTL and select.
I’m not the most proficient in php and really appreciate any help on this. I’m even willing to upgrade to pro if it does it ??
My current categories php file has this code:
global $EM_Event; /* @var $EM_Event EM_Event */ $categories = EM_Categories::get(array('orderby'=>'name','hide_empty'=>0)); ?> <?php if( count($categories) > 0 ): ?> <div class="event-categories"> <!-- START Categories --> <label for="event_categories[]"><?php _e ( 'Category:', 'dbem' ); ?></label> <select name="event_categories[]" multiple size="10"> <?php $selected = $EM_Event->get_categories()->get_ids(); $walker = new EM_Walker_CategoryMultiselect(); $args_em = array( 'hide_empty' => 0, 'name' => 'event_categories[]', 'hierarchical' => true, 'id' => EM_TAXONOMY_CATEGORY, 'taxonomy' => EM_TAXONOMY_CATEGORY, 'selected' => $selected, 'walker'=> $walker); echo walk_category_dropdown_tree($categories, 0, $args_em); ?></select> <!-- END Categories --> </div> <?php endif; ?>
Thanks in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Event Form – Categories as checkboxes’ is closed to new replies.