I have a content type book and it has a taxonomy term reference field: author
.
I want to enter name and surname separately for each author on node add/edit page. Name and surname together will be the taxonomy term.
If I enter John for the name and Smith for the surname the taxonomy term will be John Smith.
I'm doing this by using the Inline Entity Form module with the Automatic Entity Label module.
The problem here is: the Inline Entity Form has two options while entering the term:
Add new term
Add existing term
.
If you don't know if the term exists or not it become useless.
What I need is only one option and if the entered [name + surname]
exist then select it as author automatically and if that not exist create a new term.
How can I do this?
(Similar structure can be created with some different methods such as References Dialog module, Entity Connect module etc but the main problem exist there too.)
Note: This question is not a duplicate of "How to create a name-surname structure for taxonomy terms?" ... even though they use the same image. In this question the main point is "how to combine creating new term and choosing existing one options", in the other question "how to create a name-surname structure on node form" is asked.