Reply To: Pre Populate custom fields logged in users

what i have done in easyreservations_form_shortcode.php is this:

if ( is_user_logged_in() ){
$current_user = wp_get_current_user();
$reg_name = ($current_user->user_firstname .’ ‘. $current_user->user_lastname);
$reg_mail = ($current_user->user_email);

and then

elseif($field[0]==”email”){
/*Registered usermail hack*/
$value = (empty($reg_mail)) ? $value : $reg_mail;
$theForm=preg_replace(‘/\[‘.$fields.’\]/’, ”, $theForm);
}

this works only for the standart fields like email and name but not with custom fields.

thank you