Find Answers and Get Support › Forums › Gwangi – PRO Multi-Purpose Membership, Social Network & BuddyPress Community Theme › Compatible Plugins › BuddyPress › 'Save and Continue' button on BP profile tabs
- This topic has 3 replies, 2 voices, and was last updated 6 years, 4 months ago by
Themosaurus.
-
AuthorPosts
-
alexParticipant@abourne
- 81 Topics
- 259 Posts
When user first signs up, I redirect them to profile /group-1 to edit.
I used code to create the ‘save and continue’
Works a charm, except for if an impatient user clicks on a tab in advanced (i.e. on tab 2 but selects to go to tab 4), it breaks sequence and redirects user to 404 page.
If there is a small tweak in this code which can be made, I kindly ask if you may point it out (if it is of benefit to your wider community).
It does not cause any drastic issue, but is just not necessary to ‘block’ and require a user to refresh page.
Note: it only occurs for the ‘post register’ sequence and flow. It does not occur at a future point in time when a user returns back to profile to edit.
function ps_redirect_next_group() { if ( ! bp_is_user_profile_edit() || ! bp_is_my_profile() ) { return; } $group_id = bp_get_current_profile_group_id()+1; if ( bp_get_current_profile_group_id()==4 ) { bp_core_redirect(bp_displayed_user_domain()."profile/"); }else{ bp_core_redirect(bp_displayed_user_domain()."profile/edit/group/$group_id/"); } } add_action( 'xprofile_data_after_save', 'ps_redirect_next_group' ); add_filter( 'gettext', 'ps_change_save_button_text', 20, 3 ); function ps_change_save_button_text( $translated_text, $text, $domain ) { if ( ! bp_is_user_profile_edit() || ! bp_is_my_profile() ) { return $translated_text; } switch ( $translated_text ) { case 'Save Changes' : $translated_text = __( 'Save and Continue', $domain ); break; } return $translated_text; }
November 17, 2018 at 02:47 #3602@themosaurus- 1 Topics
- 1675 Posts
Hi @abourne,
We’ve created a new account on your website to test the profile edition flow that you’re describing and we’re not experiencing any 404 page when clicking on the various tabs of your form…
Could please share a commented screenshot describing your issue or maybe a very short screencast? We want to make sure that we understand your issue to help you the best way possible. ?
Thanks.
November 20, 2018 at 17:17 #3672@themosaurus- 1 Topics
- 1675 Posts
You’re welcome alex. ?
Best regards,
November 23, 2018 at 09:50 #3746 -
AuthorPosts
The topic ‘'Save and Continue' button on BP profile tabs’ is closed to new replies.