WordPress.org

Ready to get started?Download WordPress

Forums

Gravity Forms Janrain Add-on
Pulling Date of Birth (2 posts)

  1. scott74
    Member
    Posted 5 months ago #

    Anyone able to get this to work with other fields such as pulling date of birth into the date field in gravity forms.

    Awesome plugin, would love to get this working with a few other fields and and possibly even pull in male or female but not have it visible on the form but still have it passed.

    Thanks Scott

    http://wordpress.org/plugins/gravity-forms-janrain-add-on/

  2. scott74
    Member
    Posted 5 months ago #

    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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.