<?php
add_filter("gform_pre_render", "populate_dropdown");
function populate_dropdown($form){
global $current_user;
get_currentuserinfo();
foreach($form['fields'] as &$field) {
if($field['inputName'] == 'email') {
$email = xprofile_get_field_data('email', $current_user->ID);
$field['choices'] = array(
array('text' => $email, 'value' => $email, 'isSelected' => ''),
array('text' => $email, 'value' => $email, 'isSelected' => ''),
array('text' => $email, 'value' => $email, 'isSelected' => '')
);
}
}
return $form;
}
?>