Tell us what you are trying to do? I would like the data collected in the User Registration form I have created to populate to a Custom Post Type.
Is there any documentation that you are following? There was a support post from a few years ago (Populate custom post type fields with user fields upon user form submission.) Is the response still valid?
add_action('cred_save_data', 'my_save_data_action',10,2);
function my_save_data_action($post_id, $form_data)
{
// if a specific form
if ($form_data['id']==12)
{
$cust_field1 = get_user_meta($post_id, 'wpcf-my-field');
$id = wp_insert_post(array('post_title'=>'random', 'post_type'=>'custom_post', 'post_content'=>'demo text'));
add_post_meta($id, 'wpcf-my-field', $cust_field1, true);
}
}
}
The above example gets the meta value from the my-field custom field, then creates a post and then update that post's custom field with the value stored in the $cust_field1 variable.
Please let me know if this example was clear for you.
I am still struggling to get this to work. I have a User Form set up with the fields needed. I see your example but I am unsure of how to get it to work.
Instead of having the user automatically created, why not allow them to create their profile after they created their user? Its a bit redundant to have the same info on the user and on the their profiles.
I would suggest this approach to maintain consistency. So if the user wants to change their info they can simply only change it one place instead of 2.
What I need is for the Membership List to be searchable. There is a private Members area so the user needs to log in before viewing the Members area. An admin will add the member and edit their info, if necessary. What is the best approach?