I put together the attached patch to allow a user to relate multiple crm contacts to a cck node type, without creating a bunch of contact reference fields. It works in exactly the same way as the nodereference.module, and I copied a bit of code from there.

To see the patch work create a cck node-type with a 'CiviCRM Contact Reference' field, and set the field widget to 'Autocomplete Contact Search' and allow for 'Multiple values'

CommentFileSizeAuthor
civinode_field_multiple.patch3.45 KBjmiccolis

Comments

Torenware’s picture

Assigned: Unassigned » Torenware

jmiccolis

I'm starting to look at refactoring the code and checking for Drupal 5.0/CiviCRM 1.6 compatibility, so this is a good time for this.

I'll look overy your patch, and will try to get back to you in the next week. By all means nag me if I don't get back to you.

Thanks,
Rob