0

I have a content type with a static field that I want to reference a specific TAX term. When a new node is added, I want the term to default to a specific reference, and I don't want the author to change it. I was thinking that a STATIC FIELD could work, but not sure how to hard code the term reference.

put another way, I want to Hard code the TAXONOMY term into a field of another node type.

any other ideas on how this would be done or alternatives?

1

One alternative could be adding a regular term reference field that has the particular taxonomy term you want referenced set as the default value. Then in a hook_form_FORM_ID_alter call the node edit form for the specific content type and set the #access value to FALSE for that 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.