WordPress.org

Ready to get started?Download WordPress

Forums

BuddyPress Registration Groups
[resolved] BuddyPress Registration Groups (5 posts)

  1. catyco
    Member
    Posted 1 year ago #

    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 }

    http://wordpress.org/extend/plugins/buddypress-registration-groups-1/

  2. OC2PS
    Member
    Posted 1 year ago #

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

  3. hardlyneutral
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  4. simonbennett
    Member
    Posted 7 months ago #

    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>
  5. hardlyneutral
    Member
    Plugin Author

    Posted 7 months ago #

    Will you need a new user to select multiple groups?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic