3

Please forgive me if this is a total noob question, but here it is anyway.

I have a content type 'person'. One of the fields I want to add to the 'person' is a relatives field and I want it to either be an autocomplete or a drop down list. I'm pretty sure I can figure that part out. The question is, how can I populate the drop down list (or the autocomplete) with the names of all 'person' content that is already created?

Also, I am using the persons full name for my title field.

I'm also running drupal 7 and I've installed the CTools and Views modules.

EDIT:

After some more thought on this, what I'm really trying to do is have a field that links to a related content node. That way if a person is ever deleted they would also be removed from those who claim to be related to them.

Does drupal have a way to do this? I have so many ideas on how to use drupal, but most of them involve relating nodes to one another in a heirarchal format.

3

I would look at the references module, this will allow you to manually set relationships between your "people".

  • I believe this should need to tweak manually..., for autocomplete structure format like tags. – Rafee Nov 3 '11 at 7:20
  • You have an auto complete widget available by default, you can specify which content types to limit the selection to, so in this case James would limit it to only "people" nodes... – WestieUK Nov 3 '11 at 7:52
  • Thanks a ton for helping me find the references module. It also led me to the related modules 'Entity Reference' and 'Relation' which might also fit what I'm looking for. – James Nov 3 '11 at 14:15

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.