Custom Fields for Profile

Customize the profile form and add custom user defined fields to profile screen.

Add User Defined Field to Profile

Description

– You can customize the profile fields for each form by customizing all profile fields. Following example adds Invitation code to the exisitng profile fields.

Parameters

– Profile field array, Various parameters( user_id => ‘User ID’ , form_name => ‘Form name of registration’ , view => ‘Template view’)

Usage
add_filter( 'upme_profile_edit_fields','upme_profile_fields',10,2);
add_filter( 'upme_profile_display_fields','upme_profile_fields',10,2);
function upme_profile_fields($fields , $params){

	switch($params['form_name']){
		case 'subscriber_registration':

			$invlitation_code = array(
	            'type' => 'usermeta',
	            'icon' => 'user',
	            'field' => 'text',
	            'name' => 'Invitation Name',
	            'meta' => 'invitation',
	            'meta_custom' => '',
	            'social' => 0,
	            'can_edit' => 1,
	            'allow_html' => 0,
	            'can_hide' => 1,
	            'private' => 0,
	            'required' => 0,
	            'show_to_user_role' => 0,
	            'edit_by_user_role' => 0,
	            'show_in_register' => 1,
	            'help_text' => '',
	            'choices' => '',
	            'predefined_loop' => 0,

								);
			array_push($fields,$invlitation_code);
			break;
	}

	return $fields;
}

Get your copy of User Profiles Made Easy on CodeCanyon