I've been searching quite a bit on this already and was not able to find a solution. installation is d10 So on my node I have an entity reference field which is showing Taxonomy terms. Two of those taxonomy terms should always be hidden on the node form. But they should exist as taxonomy terms, so removing them from the taxonomy is not an option. I tried using hook_form_alter() and unsetting the keys, but that didn't work.

Anyone has experience with this?

Thanks in advance!

  • I'm wondering if you could use a Views entity reference with a filter to get what you want, then choose that View in the Term entity reference field settings Commented Aug 29, 2023 at 22:51
  • @WebAssistant That would be a solution, I will try this. Commented Aug 30, 2023 at 6:15
  • 1
    @WebAssistant Hey I just tested that, and that works fine. Thanks! Commented Aug 30, 2023 at 8:49

1 Answer 1


@WebAssistant 's answer:

create an Entity Reference View and use a filter to remove the unwanted terms. In the settings of the reference field on the node choose: Views: filter by an entity reference view. Choose the view you created and voila.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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