Hi Caridad,
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’]==474) {
if ( !is_user_logged_in() ) {
wp_insert_post( array(
'ID' => $post_id,
'post_author' => 2 // anonymous
) );
}
}
}
This does not work for me… Form ID is 474 and the anonymous user account is ID #2… I also tried user #1 and that didn't work either.