1

I have to create a new taxonomy term that has no name field.

I created one master vocabulary. Then I created another vocabulary and term having only entity reference field. Default description field was deleted. I would like to change hierarchy and combination of any terms from reference master vocabulary.

Normally, term has a mandatory name field and description field. I'd like to change the name field type in the entity reference, but it is impossible. After adding a different entity reference field, it is an error to disable the existing name field. Perhaps, the reason for the name field is probably because it is mandatory.

Name field of term, rather than being arbitrarily input, want to specification referenced by the fields of the other taxonomy terms. Description field is same case. All field are refarence field from master vocabrary or others. In other words, we want to make the vocabulary set by another hierarchy and combinations.

Do you have any idea?

1

It's a required part of the entity. The name field for a Drupal 7 taxonomy term is defined in the taxonomy's module:

  • hook_entity_info() invocation to designate name as the label (a human readable field that's required for displaying entity).
  • hook_field_extra_fields() invocation to define the name field within the taxonomy term for the admin UI.

The Drupal API does expose hook_entity_info_alter() & hook_field_extra_fields_alter(). You can use these function to redefine how you'd like specify your taxonomy term label field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.