Tell us what you are trying to do?
Empty title value coming from parent post and date from field wpcf-data_raskrytiya is coming as strange number (not date).
CODE:
add_action('cred_save_data', 'your_save_data_action',10,2);
function your_save_data_action($post_id, $form_data)
{
// if a specific form
if ($form_data['id']==1967)
{
$docyear = get_post_meta($post_id, 'wpcf-data_raskrytiya', true);
$custname = isset($_POST['@khrustalnyi_shar_parent']) ? get_the_title($_POST['@khrustalnyi_shar_parent']) : '';
$drdetail= $docyear. ' - ' . $custname. ' - ' ;
$args = array('ID' => $post_id, 'post_title' => $drdetail);
wp_update_post($args);
}
}
Is there any documentation that you are following?
https://toolset.com/forums/topic/set-a-relational-post-title-with-code/
Is there a similar example that we can see?
What is the link to your site?
Important that there should be relationship slug NOT parent slug of the post.