Hi,
I need to have a CCK field with multiple users, and I need each user to be able to be there multiple times, or ideally to have a ponderation. Like:
- joe - joe - joe - jane - rob - rob
or (even better):
- joe x 3 - jane - rob x 2
So far all multiple selections I found only allow 1 instance of each user. Does anyone have an idea how I could do that ?
Thanks, Xav
love to help but i am not sure i understand your situation.
Xavier Bestel wrote:
Hi,
I need to have a CCK field with multiple users, and I need each user to be able to be there multiple times, or ideally to have a ponderation. Like:
- joe
- joe
- joe
- jane
- rob
- rob
or (even better):
- joe x 3
- jane
- rob x 2
So far all multiple selections I found only allow 1 instance of each user. Does anyone have an idea how I could do that ?
Thanks, Xav
If you mean, having cck "html select lists" that allow selection of multiple "options"
Le jeudi 06 mai 2010 à 21:33 +0300, Mutuku Ndeti a écrit :
If you mean, having cck "html select lists" that allow selection of multiple "options"
No, I mean being able to select one option multiple times.
In my example, if I have 4 users on my site: joe, jane, karl & rob, I want to be able to make a selection which contains 3 x joe, 1 x jane & 2 x rob.
Am I clear ?
Xav
without knowing why or how or with what purpose you want to do this, it doesnt make any sense... :(
Xavier Bestel wrote:
Le jeudi 06 mai 2010 à 21:33 +0300, Mutuku Ndeti a écrit :
If you mean, having cck "html select lists" that allow selection of multiple "options"
No, I mean being able to select one option multiple times.
In my example, if I have 4 users on my site: joe, jane, karl & rob, I want to be able to make a selection which contains 3 x joe, 1 x jane & 2 x rob.
Am I clear ?
Xav
sebastian wrote:
without knowing why or how or with what purpose you want to do this, it doesnt make any sense... :(
Xavier Bestel wrote:
Le jeudi 06 mai 2010 à 21:33 +0300, Mutuku Ndeti a écrit :
If you mean, having cck "html select lists" that allow selection of multiple "options"
No, I mean being able to select one option multiple times.
In my example, if I have 4 users on my site: joe, jane, karl& rob, I want to be able to make a selection which contains 3 x joe, 1 x jane& 2 x rob.
Am I clear ?
Is it like you're voting for joe and want to display the count of joe votes?
Le jeudi 06 mai 2010 à 15:16 -0400, Earnie Boyd a écrit :
sebastian wrote:
without knowing why or how or with what purpose you want to do this, it doesnt make any sense... :(
Xavier Bestel wrote:
Le jeudi 06 mai 2010 à 21:33 +0300, Mutuku Ndeti a écrit :
If you mean, having cck "html select lists" that allow selection of multiple "options"
No, I mean being able to select one option multiple times.
In my example, if I have 4 users on my site: joe, jane, karl& rob, I want to be able to make a selection which contains 3 x joe, 1 x jane& 2 x rob.
Am I clear ?
Is it like you're voting for joe and want to display the count of joe votes?
I don't think so. In fact, during a trip I'm filling a car with people. Some of these people are members of the "club", some are foreign people. Each foreign people is "associated" with one member. I want to count how much "seats" a member costs for the trip. So if joe is in the car with 2 foreign friends, joe counts for 3 seats.
Then sometimes I'll be able to add all the costs for all the trips for each member.
I hope I was clearer this time.
Xav
ok that makes more sense.
are your "seats" filled by users?
if so, you would make a node for a "trip" or a "car" and then users could "attach" themselves to that node.
you can then write a simple script that counts the number of users assigned to a node, which becomes your "number"; possibly in combination with a "view" and otherwise as a contemplate for a node.
i would have to really sit down to figure out which modules/code i would use and look at the api/defined variables for this.
but this is most likely, IMHO, the process you want to employ.
Xavier Bestel wrote:
Le jeudi 06 mai 2010 à 15:16 -0400, Earnie Boyd a écrit :
sebastian wrote:
without knowing why or how or with what purpose you want to do this, it doesnt make any sense... :(
Xavier Bestel wrote:
Le jeudi 06 mai 2010 à 21:33 +0300, Mutuku Ndeti a écrit :
If you mean, having cck "html select lists" that allow selection of multiple "options"
No, I mean being able to select one option multiple times.
In my example, if I have 4 users on my site: joe, jane, karl& rob, I want to be able to make a selection which contains 3 x joe, 1 x jane& 2 x rob.
Am I clear ?
Is it like you're voting for joe and want to display the count of joe votes?
I don't think so. In fact, during a trip I'm filling a car with people. Some of these people are members of the "club", some are foreign people. Each foreign people is "associated" with one member. I want to count how much "seats" a member costs for the trip. So if joe is in the car with 2 foreign friends, joe counts for 3 seats.
Then sometimes I'll be able to add all the costs for all the trips for each member.
I hope I was clearer this time.
Xav
The problem is that a user should be able to occupy multiple seats, so it should attach multiple times. That's what I don't know how to do, short of rewriting an input module.
Xav
Le jeudi 06 mai 2010 à 13:43 -0700, sebastian a écrit :
ok that makes more sense.
are your "seats" filled by users?
if so, you would make a node for a "trip" or a "car" and then users could "attach" themselves to that node.
you can then write a simple script that counts the number of users assigned to a node, which becomes your "number"; possibly in combination with a "view" and otherwise as a contemplate for a node.
i would have to really sit down to figure out which modules/code i would use and look at the api/defined variables for this.
but this is most likely, IMHO, the process you want to employ.
Xavier Bestel wrote:
Le jeudi 06 mai 2010 à 15:16 -0400, Earnie Boyd a écrit :
sebastian wrote:
without knowing why or how or with what purpose you want to do this, it doesnt make any sense... :(
Xavier Bestel wrote:
Le jeudi 06 mai 2010 à 21:33 +0300, Mutuku Ndeti a écrit :
If you mean, having cck "html select lists" that allow selection of multiple "options"
No, I mean being able to select one option multiple times.
In my example, if I have 4 users on my site: joe, jane, karl& rob, I want to be able to make a selection which contains 3 x joe, 1 x jane& 2 x rob.
Am I clear ?
Is it like you're voting for joe and want to display the count of joe votes?
I don't think so. In fact, during a trip I'm filling a car with people. Some of these people are members of the "club", some are foreign people. Each foreign people is "associated" with one member. I want to count how much "seats" a member costs for the trip. So if joe is in the car with 2 foreign friends, joe counts for 3 seats.
Then sometimes I'll be able to add all the costs for all the trips for each member.
I hope I was clearer this time.
Xav
-- [ Drupal support list | http://lists.drupal.org/ ]
Xavier Bestel wrote:
Le jeudi 06 mai 2010 à 15:16 -0400, Earnie Boyd a écrit :
sebastian wrote:
without knowing why or how or with what purpose you want to do this, it doesnt make any sense... :(
Xavier Bestel wrote:
Le jeudi 06 mai 2010 à 21:33 +0300, Mutuku Ndeti a écrit :
If you mean, having cck "html select lists" that allow selection of multiple "options"
No, I mean being able to select one option multiple times.
In my example, if I have 4 users on my site: joe, jane, karl& rob, I want to be able to make a selection which contains 3 x joe, 1 x jane& 2 x rob.
Am I clear ?
Is it like you're voting for joe and want to display the count of joe votes?
I don't think so. In fact, during a trip I'm filling a car with people. Some of these people are members of the "club", some are foreign people. Each foreign people is "associated" with one member. I want to count how much "seats" a member costs for the trip. So if joe is in the car with 2 foreign friends, joe counts for 3 seats.
Then sometimes I'll be able to add all the costs for all the trips for each member.
I found http://drupal.org/project/agreservations which appears to be a bit more than you need or perhaps http://drupal.org/project/attribute would work for you.
On Thu, 2010-05-06 at 17:04 -0400, Earnie Boyd wrote:
Xavier Bestel wrote:
Le jeudi 06 mai 2010 à 15:16 -0400, Earnie Boyd a écrit :
sebastian wrote:
without knowing why or how or with what purpose you want to do this, it doesnt make any sense... :(
Xavier Bestel wrote:
Le jeudi 06 mai 2010 à 21:33 +0300, Mutuku Ndeti a écrit :
If you mean, having cck "html select lists" that allow selection of multiple "options"
No, I mean being able to select one option multiple times.
In my example, if I have 4 users on my site: joe, jane, karl& rob, I want to be able to make a selection which contains 3 x joe, 1 x jane& 2 x rob.
Am I clear ?
Is it like you're voting for joe and want to display the count of joe votes?
I don't think so. In fact, during a trip I'm filling a car with people. Some of these people are members of the "club", some are foreign people. Each foreign people is "associated" with one member. I want to count how much "seats" a member costs for the trip. So if joe is in the car with 2 foreign friends, joe counts for 3 seats.
Then sometimes I'll be able to add all the costs for all the trips for each member.
I found http://drupal.org/project/agreservations which appears to be a bit more than you need or perhaps http://drupal.org/project/attribute would work for you.
Well, not really, agreservations is something else, and attribute could work if it used something else than pure textfields (i.e. if I could choose a userreference field + a number field). I'll find another way to implement it.
Thanks, Xav
On Thu, 2010-05-06 at 17:18 +0200, Xavier Bestel wrote:
Hi,
I need to have a CCK field with multiple users, and I need each user to be able to be there multiple times, or ideally to have a ponderation. Like:
- joe
- joe
- joe
- jane
- rob
- rob
or (even better):
- joe x 3
- jane
- rob x 2
So far all multiple selections I found only allow 1 instance of each user. Does anyone have an idea how I could do that ?
My bad, it works, I just have to use multiple autocomplete fields. All other selection method don't work. I would have preferred to have multiple drop-down lists, but it works like this.
Thanks, Xav
How about a "reservation" flexifield that has two fields: related_user (userreference dropdown) seats (default 1)
That's how we'd do it here.
On May 7, 2010, at 2:30 AM, Xavier Bestel wrote:
On Thu, 2010-05-06 at 17:18 +0200, Xavier Bestel wrote:
Hi,
I need to have a CCK field with multiple users, and I need each user to be able to be there multiple times, or ideally to have a ponderation. Like:
- joe
- joe
- joe
- jane
- rob
- rob
or (even better):
- joe x 3
- jane
- rob x 2
So far all multiple selections I found only allow 1 instance of each user. Does anyone have an idea how I could do that ?
My bad, it works, I just have to use multiple autocomplete fields. All other selection method don't work. I would have preferred to have multiple drop-down lists, but it works like this.
Thanks, Xav
-- [ Drupal support list | http://lists.drupal.org/ ]
Le vendredi 07 mai 2010 à 16:53 +0000, Bayne, Sam a écrit :
How about a "reservation" flexifield that has two fields: related_user (userreference dropdown) seats (default 1)
Wow .. I wish I found flexifield sooner ! Thanks a lot for the hint Sam.
Xav