1

I have an entity reference field for taxonomy terms on a node.

The Default Reference method has the option Create referenced entities if they don't already exist.

This lets me add new terms via the entity reference field when creating a node.

I want to restrict the terms that can be selected, so I set the Reference method to Views: Filter by an entity reference view.

However, when filtering by an entity reference view, I can't add new terms via the entity reference field when creating a node.

Is there a way to use Views: Filter by an entity reference view and still let users create new terms?

Additional info: My custom views filter simply filters the terms to those that were created by the logged-in user, so in this case, there is no possibility that allowing users to create terms would make it impossible for them to use the created terms on the node.

1
  • Workaround, you could either programmatically via hook_form_alter use custom autocomplete OR via hook_form_alter add custom validation that creates the term if it doesn't already exist. – No Sssweat Jul 20 '20 at 14:35

Your Answer

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

Browse other questions tagged or ask your own question.