WordPress.org

Support

Support » Plugins and Hacks » Pulling Date of Birth

Pulling Date of Birth

Viewing 1 replies (of 1 total)
  • Cant seem to get any of these fields workign

    add_filter( 'janrain_gforms_profile_data', 'add_more_fields' );
    
        function add_more_fields( $fields ) {
            $fields['birthday'] = array(
                'name' => 'Birthday',
                'function' => 'birthday_field'
            );
            $fields['gender'] = array(
                'name' => 'Gender',
                'function' => 'gender_field'
            );
    		$fields['photo'] = array(
                'name' => 'Photo',
                'function' => 'photo_field'
            );
            return $fields;
        }
    
        function birthday_field( $profile ) {
           return $profile->merged_poco->birthday_date;
        }
    
        function gender_field( $profile ) {
            return $profile->gender;
        }
    
    	 function photo_field( $profile ) {
            return $profile->photo;
        }
    
        function cellphone_number( $profile ) {
            if ( isset( $profile->phoneNumbers ) &&
                    is_array( $profile->phoneNumbers ) ) {
                foreach ( $profile->phoneNumbers as $number ) {
                    if ( in_array( $number->type, array( 'mobile', 'personal', 'cellular') ) )
                        return $number->value;
                }
            }
    
            // Backup. If nothing is set as a mobile or cell number, you might just
            // want to use their default number.
            if ( isset( $profile->profile->phone ) )
                return $profile->profile->phone;
        }

    Noticed Fb has alternate for bday of birthday_date but not sure how to write that in here

    https://developers.facebook.com/docs/reference/fql/user/

    Any help would be appreciated in getting bday working.. I am using the gravity forms date picker field MM/DD/YYY

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Pulling Date of Birth’ is closed to new replies.