I've been searching for hours, but can't seem to find a solution to this. Now, I'm able to create a plain old text field as such as this:
In moduleA.install:
if (!field_info_field('field_myfield')) {
$field = array(
'field_name' => 'field_myfield',
'type' => 'text',
);
field_create_field($field);
}
Then, in moduleB.install, I add that field to a specific taxonomy bundle:
$instance = array(
'field_name' => 'field_myfield',
'entity_type' => 'taxonomy_term',
'label' => 'MyField',
'bundle' => 'new_terms',
'widget' => array(
'type' => 'text',
),
);
field_create_instance($instance);
What I would like is the field it creates to be a select list, instead of just a text field. I've been looking around, trying to figure it out (using "list-select" in place of type), but any time I've deviated from what's above, I get an error on field_create_instance when installing moduleB. I realize it's probably (hopefully) something as simple as knowing the proper widget name, but I either can't seem to find it, or am searching for the wrong thing.