That got me moving in the right direction!
If I check “save to taxonomy” and the “enhanced UI” buttons and then fill the box with some comma separated values, I can see that multiple (tag-style) values WILL populate to the same single taxonomy. Thanks Jeremy!
Now that I know this method works, AND that I can’t have multiple fields saving to the same taxonomy, I realize that if I want to save multiple values to the same taxonomy it will have to be through a single input. Since I’m using multiple custom fields (single line text) to populate my taxonomy, I’m now trying to find a way to use a gform pre_submission_handler to concatenate my user inputs into a csv’d string and drop that into the “save to taxonomy” post value. I already do something similar in my functions.php for taxonomies that only get one value from the form. Note: All of this wouldn’t be needed to do this if the “save to taxonomy” box was available when using custom input types.
Here is my code which copies a value from one gform field into another, which in my case copies the value from a custom input field and pastes it into the “save to tax” box. The last commented out line is where I’m stuck…
/* Copies a value from one gform field into another. Used in combo with taxonomies to help build a search index
* See here: https://www.gravityhelp.com/forums/topic/how-to-populate-a-hidden-field-with-een-other-field#post-81974
* [Save to Taxonomy field] = [GF Custom Field]
*/
add_action("gform_pre_submission_1", "pre_submission_handler");
function pre_submission_handler($form){
//reason
$_POST["input_77"] = $_POST["input_89"];
//product
$_POST["input_92"] = $_POST["input_90"];
//manufacturers???
//$_POST["input_92"] = $_POST["input_90"]+$_POST["input_92"]+$_POST["input_92"];
}
Long shot, but does any kind soul have any ideas on how to expand that code in a way which would string multiple $_POST values into a single csv’d $_POST value? If not, looks like I’m off to learn how/if PHP can cherry-pick values from an array and string them together…