Hello. Thank you for contacting the Toolset support.
As I understand - you are asking that if you remove the custom field wpv-name and wpv-city, is there any effect on the code that Christian shared - is that correct? If no: could you please explain your question with brief test case example.
the idea is to clone the data, but to clear the content of some special fields. In my example I have a database with cd reviews. If the next cd comes I only need some data, but not song-1. song-2, song-3 and the album name.
It would be great, if I could clear them while cloning the rest?
When you say clone data - what is the exact process of clone data and which fields you would like to remove?
As when you clone the data - eventually it will create a new post ID (if I'm not wrong), could you please share test case example and your exact required output.
I have set the next reply to private which means only you and I have access to it.
I've added following code to your current theme's functions.php file:
add_action('cred_save_data_17859', 'func_clone_duplicate_post', 10, 2);
function func_clone_duplicate_post($post_id, $form_data) {
// get data of original post
update_post_meta($post_id,'wpcf-album','');
update_post_meta($post_id,'wpcf-jahr','');
update_post_meta($post_id,'wpcf-beitragsslink','');
update_post_meta($post_id,'wpcf-song-1','');
update_post_meta($post_id,'wpcf-song-2','');
update_post_meta($post_id,'wpcf-song-3','');
}
The above code is responsible to reset the said field value to empty. Could you please confirm that this works for you.