Closed (won't fix)
Project:
Taxonomy Builder API
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Mar 2011 at 01:06 UTC
Updated:
31 Dec 2011 at 15:23 UTC
Did you know that if you wanted to save extra array data into fields that have been created by the Term Fields module that it WORKS! I was creating a feature request post to ask for this ability, but figured I should try to see if magically it would work. Sure enough it did.
So, maybe this tidbit of information might help someone in the future :)
I only did a couple tests, but this seems to work just fine.
An example:
<?php
$vid = 12;
// Array of $form_value arrays that will be passed to taxonomy_save_term().
$hierarchy = array(
array(
'name' => 'United States',
'description' => 'Country',
'createdfield1' => '1',
'createdfield2' => 'abcd'
),
array(
'name' => 'Massachusetts',
'description' => 'State',
'createdfield1' => '3',
'createdfield2' => 'efgh'
),
array(
'name' => 'Boston',
'description' => 'City',
'createdfield1' => '9',
'createdfield2' => 'ijkl'
),
);
// Adds terms to the tree.
taxonomy_builder_save_terms($vid, $hierarchy);
?>
Comments
Comment #1
mkinnan commentedApparently, I screwed up the link to term fields in my post that I cannot edit.
http://drupal.org/project/term_fields
Comment #2
cpliakas commentedClosed due to end of life announcement.