I'm trying to create a relation in D8 between a counselor and clients. The counselor would have to record counseling hours for each client. I've looked at the group module, even building the relation using RedHen CRM. Just curious, anyone have suggestions?

  • You could insert session entities for each client in a client form (client content type). After that you could improve on that solution with Entity Browser, so adding a session to a client's node would be easier. – Jorge Montoya Jan 11 '19 at 22:51
  • Or just adding Entities to the node with Inline Entity Form. drupal.org/project/inline_entity_form – Jorge Montoya Jan 11 '19 at 22:53

You seem to need two relations/references; one to connect clients with counselors, assuming that doesn't change for each new session, and then a session node (Session Content type) related to either the client or the councelor, depending on what makes more sense in your case.

Or you might orient it around sessions, where you have two user reference fields, one to the counselor and the other to the client. Although that seems less likely to make sense.

If the hours is the only thing that needs to be recorded maybe you can get away with only the reference between counselor and clients, with the added Hours field to the reference field, with unlimited values so with each new session another value is added. You can use Views to summ them up.

You haven't said anything about privacy and permissions requirements and how the data is maintained. There are modules that can control access through references made between entities. Maybe explore that to find the right combination for you.

Group module can also be used, although it may be an overkill depending on your requirements.

Which modules/structures to use and build becomes obvious once you have all your requirements clarified.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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