By jerome72 on
Hi :)
I would like to have a CCK field containing multiple values, but with only one value visible.
For instance, I'd like to have a select box containing some names, but I also want to be able to retrieve phone numbers and emails:
What should be visible in my select box:
- John
- Sarah
- Robert
Then, I'd like with Views be able to retrieve John's phone and email.
Is there a module or a CCK field that can do this ?
Comments
use ajax
I would suggest to write your own custom code. On select of any item (in your case names), call a function which fires a db query to fetch other data such as phone no. and email.
That's what I thought about
That's what I thought about first, but I was wondering if there were another way to do it..
BTW, thanks for answering
Managed to do it
I started out a new custom module, but finally I managed to do the job without creating a module. It's really simple:
- Create a content type containing the fields you need
- Create a node_reference field to the content type newly created
- Download and activate node_import module, import your fields from a csv file
- And now I have my select list with hidden fields !