Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove the “Comment” step when joining a group


  • gmbyrom
    Participant

    @gmbyrom

    Hi all

    When a user joins a Buddypress group there’s an extra step that I would rather not have. They click the “Request membership” link, then get taken to a page where they can add a comment and then complete their membership request.
    How can I remove this extra comment step please? It’s confusing my users who think they’ve already sent the request as soon as they click the first link, and then navigate away from the page and don’t complete the process.

    Thanks
    Greg.

Viewing 5 replies - 1 through 5 (of 5 total)

  • shanebp
    Moderator

    @shanebp

    In a standard BP install, there is no “Comment” step when joining a group.
    Your site has added that behavior via your theme, some other plugin or some custom code.


    gmbyrom
    Participant

    @gmbyrom

    Hi Shane

    This is actually standard Buddypress functionality that I’m trying to change. See this Codex page:

    How To Join a Private Group


    Under the heading “Single group page”, Step 2 is the step I am trying to eliminate.

    Any help you can provide would be greatly appreciated.

    Thanks
    Greg.


    shanebp
    Moderator

    @shanebp

    Wow, that is annoying. Never noticed it before.

    imo – the simplest approach is to add some js to submit the form as soon as it appears.

    Add this to your theme > functions.php or bp-custom.php

    function pp_submit_request_form() {
    ?>	
    	<script type="text/javascript">
    		jQuery(document).ready(function ($) {
    			$('#group-request-send').click();
    		});
    	</script>
    <?php
    }
    add_action( 'bp_after_group_request_membership_content', 'pp_submit_request_form' );

    And you could remove or replace the comment field that is briefly visible by editing the template.
    If you’re using the BP Legacy template pack, overload and then edit this file:
    buddypress\bp-templates\bp-legacy\buddypress\groups\single\request-membership.php


    gmbyrom
    Participant

    @gmbyrom

    Haha thanks Shane! Yes it is annoying. I’m really struggling with it as I’m sure many users just click “request membership” and then browse elsewhere not realising they still need to submit the request.
    Thanks I’ll try that and let you know how it goes!


    gmbyrom
    Participant

    @gmbyrom

    Thanks Shane, yes that works! Thanks for your help. I’ve only done the first part so far though, the second part I’m not sure what I should edit in request-membership.php? I’m not a dev so I struggle to understand code…

    Thanks

    Greg.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar