Re: How to show multiple profile field groups on register.php?
Success! It turns out I was much closer than I thought. I had done some extensive rearranging and adding of divs to the editfield divs, and didn’t have the do_action( ‘bp_custom_profile_edit_fields’ ) in the correct place. I also used some code from @sbrajesh that he posted at http://bpdev.pastebin.com/RLreXE7X that was intended for displaying all profile fields on the profile page.
To see (and understand) what I was trying to do, you can see it at http://phrstudents.org/register/. For anyone interested in the complete code for my registration page, with all the appropriate php tags, I’ve posted it at http://pastebin.com/XA0Uii3A. Because of the multiple loops and divs I added for styling, it’s pretty long.
Essentially, for each profile field group I want to display I start each loop with:
php if ( function_exists( ‘bp_has_profile’ ) ) : if ( bp_has_profile( ‘profile_group_id=1’ ) ) : while ( bp_profile_groups() ) : bp_the_profile_group();
I change “( ‘profile_group_id=1’ )” to “( ‘profile_group_id=3’ )” or “( ‘profile_group_id=4’ )”, etc.
I end each loop with:
php endwhile;
php $fields_ids[]= bp_get_the_profile_group_field_ids();
php endwhile; endif; endif;
input type=”hidden” name=”signup_profile_field_ids” id=”signup_profile_field_ids” value=”php echo implode(“,”,$fields_ids); “
And somehow, it all works!