0

I have a custom content type that is associated to groups. When I create a new item, the URL is /node/add/content_type?gids[0]=xxx, where xxx is the node id of the organic group whose this content will be associated. One of the field of this content type is a user reference. I wanted that this reference is restricted to only members of this group. This should be accomplished easily using "select list" as the widget for the user_reference field and selecting a view which returns just the members of the group as the "View used to select the users:". og_members views seems perfect, but unfortunately it works with urls like /xxx and not ?gids[0]=xxx. I googled a lot and tried several things, even create a new view from scratch, without success. Any help would be appreciated...

2
  • It helps if you mention your Drupal version! Nov 14, 2011 at 14:56
  • it's drupal 6 with views 2 Nov 14, 2011 at 17:22

2 Answers 2

1

Try Views Arguments Extras that lets you set URL params (gid[0], in this case) as arguments. You can also "push" arguments to the View at the User-Reference field's settings page. You just need to return the URL param to the View. You must configure the View accordingly.

return $_GET['gid[0]'];
0

You will want to use the Views Module, but it has a learning curve (well worth studying!). Try the video series at Nodeone.se called Taming the Beast. You will emerge as a guru of Viewdom.

Also, there is a closely related question here to look at.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.