Hello,
My form files to a custom post type in a Pending status. Only signed in users can submit entries with the form.
I'm having a problem getting the user that's signed in to be associated to the Pending post that's created. Right now it's always defaulting to me.
I've tried using a hidden field with the default value set to User Login. In the email that's generated I can see the correct user's login name defined, but the post is not associated to the user.
I've also tried dynamically populating the field with:
add_filter('gform_field_value_submitted_by_user', 'populate_submitted_by_user');
function populate_submitted_by_user($value){
global $current_user;
get_currentuserinfo();
return $current_user -> user_login;
}
Again, the email that's generated displays the correct user login name but the post is not associated to the user.
Users are set as contributors when registering on the site.