Hi All
I've come across a great looking piece of code that appears to enable one to specify that a tag entered into the tags field should go to a specified custom taxonomy: http://code.hyperspatial.com/104/gravity-forms-taxonomy-fix/
Here's the code:
<?php
//Tag to Taxonomy - A fix for gravity forms
function hyp_tag_to_taxonomy( $form ){
$id = $form['post_id'];
$raw_tag_list = $form['12'];
$tag_array = explode(',', $raw_tag_list);
foreach ($tag_array as $tag){
wp_set_object_terms( $id, $tag, 'collective',true);
}
}
add_action( 'gform_post_submission', 'hyp_tag_to_taxonomy' );
?>
My question please is whether this can be done for multiple different taxonomies across different forms on a single site, i.e.,:
(1) Can it be done for two different tag fields in a single form, with tags entered into the first tag field going to WP's default tags taxonomy, and tags entered into the second tag field going to a custom taxonomy?
(2) Can it be done across multiple different forms?
Any help on this one much appreciated. The ability to slice and dice taxonomies in this way would be fantastic.
Cheers
Richard