Hello, I need some help please:

I would like users to be able to select from a few checkboxes, during user registration (or when updating their user profile). Depending on which checkbox they select, I would like to display a different color marker.

For example, I would like users, during registration or in their profile, to select from a list of checkboxes: Democrat, Republican or Independent. If they select Democrat, their marker is blue, Republican is red and Independent is white.

I do have the gmap module up and running and it is displaying user locations properly. I would like to change the marker color depending on the criteria.

Thank you in advance, from this novice user!

Comments

mntash’s picture

Here is something that I thought might work but I'm not sure yet.. anyone?
http://drupal.org/node/35728 Customize User Profiles
http://drupal.org/node/45888 Handle Checkbox Profile Fields

mntash’s picture

What about CCK & Content Profile? Would that allow me to add these checkboxes, then have Gmap use different markers depending on the checkbox's value?

nivelula’s picture

I would suggest you set up three different user roles, Democrat, Republican and Independent. Then you can enable role selection in the user register screen and gmap views allows you to display different markers for each user role.

Hope that helps!

mntash’s picture

Hey man, thanks so much. You really got me pointed in the right direction and I got it working about 95%!

The only problem I am having now is that the new Gmap view only displays one role type (Democrat) instead of all 3 roles.

Here is the Query output I have in views:

SELECT users.uid AS uid, 
 users.picture AS users_picture, 
 users.name AS users_name, 
 users.mail AS users_mail, 
 location.city AS location_city, 
 location.country AS location_country, 
 location.postal_code AS location_postal_code, 
 location.province AS location_province, 
 location.latitude AS gmap_lat, 
 location.longitude AS gmap_lon, 
 users_roles.rid AS gmap_role_marker 
 FROM users users 
 INNER JOIN users_roles users_roles ON users.uid = users_roles.uid 
 LEFT JOIN location_instance location_instance ON users.uid = location_instance.uid 
 LEFT JOIN location location ON location_instance.lid = location.lid 
 WHERE users_roles.rid IN (5, 7, 6)

I have a feeling I do not have the "Filter" set up properly in views. Right now, I have one filter: User: Roles. My Filter Operator is "One of": democrat, independent, republican. The view is only displaying democrats (which happens to be the first "filter operator" selected.

Any hints? I'll keep fooling around with this. I'd like the user role gmap to display all users at the same time (dem, ind., repub) and not just democrat.