Is there a way to accomplish this for multiple forms?
add_filter("gform_post_data", "empty_tags", 10, 2);
function empty_tags($post_data, $form){
//replace 4 with your actual form id
if($form["id"] !=4)
return;
$post_data["tags_input"] = null;
return $post_data;
}
add_filter("gform_post_submission", "insert_custom_taxonomies", 10, 2);
function insert_custom_taxonomies($entry, $form){
//REPLACE 4 with your actual form id
if($form["id"] !=4)
return;
//getting post
$post_id = $entry["post_id"];
//REPLACE 2 with your actual field id and "post_tag" with your custom taxonomy
wp_set_object_terms($post_id, explode(",", $entry[2]), "post_tag");
//REPLACE 3 with your actual field id and "activities" with your second taxonomy
wp_set_object_terms($post_id, explode(",", $entry[3]), "activities");
}
It's perfect for a single form, but I have several others where I need to do the same.