Hi ,

Suppose I have towns and users (many-to-many Relation) every user control many towns and every towns controlled by many users.
If a user adds real-estate under town he can select all the towns.
I need to allow hem to add real-estate in the towns under his control only he should not add real-estate in any towns.

I hope my question is clear :)

Thanks

Comments

marcvangend’s picture

That's funny, your question is clear even though you didn't really ask a question...

I guess I would do something like this:
- create a 'towns' vocabulary with all towns as terms
- use the content_profile module for user profiles and allow the user profiles to be tagged with towns (creating the m-m relation between towns and users)
- create a 'real-estate' content type which can also be tagged with one or more terms from the towns vocab
- alter the add-real-estate form so only the towns that are associated with the user profile can be selected; maybe http://drupal.org/project/cck_taxonomy_subset can do that (just a guess, never used the module myself), otherwise, you will have to create a custom module implementing hook_form_alter.

I hope my answer is clear :)