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.
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.
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
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!
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.