Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] How to customize the order of fields of registration


  • rcjr24
    Participant

    @rcjr24

    Im using 2014 wordpress template and has 2.0.1 version of buddypress installed. I’d like to know if how could I properly reorder the fields on registration. My template path is [my theme]/buddpress/members/index-registration.php… Could it be possible to create my own template just by using or calling a function like this <?php if ( 'Registration Type' == bp_get_the_profile_field_name() ) : ?> inside a loop? Hope someone could give me an idea. Thanks

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

  • @mercime
    Keymaster

    @mercime

    How to customize the order of fields of registration


    @rcjr24
    you can change the order within Users > Profile Fields panel
    https://codex.buddypress.org/buddypress-components-and-features/extended-profiles/


    rcjr24
    Participant

    @rcjr24

    @mercime I manage to rearrange all the fields using the code I posted, and now I have a code like this,

    <?php if ( function_exists( 'bp_has_profile' ) ) : if ( bp_has_profile( 'profile_group_id=1&hide_empty_fields=0' ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
    <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
    <?php if ( 'Country of Residence' == bp_get_the_profile_field_name() ) : ?>
    
    	<select class="country-residence" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" placeholder="<?php _e( bp_the_profile_field_name().':' ); ?>">
    		<?php //bp_the_profile_field_options(); 
    			
    			global $wpdb;
    			$sql = "SELECT * FROM wp_country_list";
    			$results = $wpdb->get_results($sql) or die(mysql_error());
    			echo '<option data-value="holder-only" class="holder">Country of Residence:</option>';
    				foreach( $results as $result ) {
    
    					echo '<option data-value="'. $result->three_letter_code .'" value="'. $result->three_letter_code .'">'.$result->name.'</option>';
    				}
    		?>
    	</select>
    	<?php do_action( bp_get_the_profile_field_errors_action() ); ?>
    
    <?php endif; ?>
    <?php endwhile;  ?>
    
    <?php endwhile; endif; endif; ?>

    Now the problem is, when the registration completes, this field doesn’t reflect to the user profile after successful registration. Hope you’ve got my point here.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] How to customize the order of fields of registration’ is closed to new replies.
Skip to toolbar