0

I am building a website a website which holds date about players and teams. There are two content types Player and Team. I want it to work like this, when we are adding a team we can add and reference multiple players into it. How can this be achieved?

1

you can achieve this using Entity reference module.

after installing the module, you go to team content type and add a new field "Entity Reference", now you can use Autocomplete widget or Autocomplete (Tagging style).

if you use Autocomplete (Tagging style) you can add multiple player names in the same field separated with commas (like tagging).

or you can use Autocomplete widget with unlimited number of values if you like each player has it own field.

Note: if you want to add player by their names, it is preferred that for player content type use the title of the node as the player name, because by default Entity reference will look for title, or you can use views for using others fields then the title

1

The simpliest way to do what you like is to use ief module. But i dont sure it works with node reference field type. So you will need to use entity reference as a generic entity reference 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.