0

We need to make many-to-many references in Drupal 7. We have 2 entities named :

  • sport activities
  • fitness clubs (physical places)

Here are some rules concerning the entity relation :

  • each sport activities can be practised in different fitness club
  • each fitness club propose several sport activities on specific time slots
  • each sport activities have several date where it can be practised in a fitness club at specific time slots

For example "fitness" can be practised in a first fitness club on monday and thuesday and can have 10 attendees. The same activity can be practised in a second fitness club but at different dates and with 20 attendees.

My issue is to know how I can use Entity Reference in order to bind those 2 content type and how i can define the time slots and how I can use register module. A registered user can register on a specific activity and all its dates...

Technically it looks like a ternary relationship between "users" which register, "sport activities" and "fitness club" ... I just began to use Drupal since a week and I didn't get the whole philosophy yet.

Thanks for your help

davidvera
  • 1,292
  • 2
  • 24
  • 55

1 Answers1

0

I found out a partial solution : - i created 3 content types : fitness clubs, activities and time slots - in the fitness club content type i added a field collection with registration and the 2 entity references : activities and time slot. This way i can add for each activity as many time slot i want and register to each of them.

My "new" issue is that i don't want to display "registration form" for each activities but the "registration type"... I want users to manage then their registration and add registration ...

davidvera
  • 1,292
  • 2
  • 24
  • 55