• Resolved catyco

    (@catyco)


    I love this plugin, but I need to change it from a check box to the drop down list. I have over 60 groups. Please help. Where do I need to do to edit the code

    function bp_registration_groups(){
    /* list groups */ ?>
    <div class=”register-section reg_groups”>
    <h3 class=”reg_groups_title”>Running Group:</h3>
    <p class=”reg_groups_description”>Select a Running Group in your area:</p>
    <ul class=”reg_groups_list”>
    <?php $i = 0; ?>
    <?php if ( bp_has_groups(‘type=alphabetical&per_page=99999’) ) : while ( bp_groups() ) : bp_the_group(); ?>
    <?php if ( bp_get_group_status() == (‘public’)) { ?>

    <li class=”reg_groups_item”>
    <input type=”checkbox” id=”field_reg_groups_<?php echo $i; ?>” name=”field_reg_groups[]” value=”<?php bp_group_id(); ?>” /><?php bp_group_name(); ?>

    <?php } ?>
    <?php $i++; ?>
    <?php endwhile; /* endif; */ ?>
    <?php else: ?>
    <p class=”reg_groups_none”>No selections are available at this time.</p>
    <?php endif; ?>

    </div>
    <?php }

    https://www.ads-software.com/extend/plugins/buddypress-registration-groups-1/

Viewing 4 replies - 1 through 4 (of 4 total)
  • OC2PS

    (@sooskriszta)

    Definitely shouldn’t change to dropdown:
    1. Dropdowns hide options
    2. Checkboxes allow multiple selections, which is desirable

    Plugin Author hardlyneutral

    (@hardlyneutral)

    I agree with OC2PS. That being said, I’ll look at adding an option to group differently in a future release. The default functionality will still remain checkboxex though.

    I don’t need options, but I am really desperate to make this a dropdown as I too will have hundreds of groups.

    Any pointers appreciated as this almost works, but not quite…

    <select id="field_reg_groups_<?php echo $i; ?>" name="field_reg_groups[]" value="<?php bp_group_id(); ?>">
      <option><?php printf( __( '%s', 'buddypress-registration-groups-1' ), bp_get_group_name() ); ?></option>
    </select>
    Plugin Author hardlyneutral

    (@hardlyneutral)

    Will you need a new user to select multiple groups?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘BuddyPress Registration Groups’ is closed to new replies.