Hi all,
Trying to figure out how to change the member / group relationship.
Essentially, I'm wanting to force a member to only be allowed to be a part of one group.
The reason behind this is because I'm using the member profiles module, and when I setup some groups that users can choose to belong to when registering, a CheckboxSetField is supplied so a user can select multiple groups.
In this particular instance, I'm wanting registrants to only be able to choose one group. For example, they can be a "Doctor" or a "Nurse". They shouldn't be able to belong to both.
The CheckboxSetField is pulled using:
$memberFields = Member::currentUser()->getMemberFormFields();
Which makes me think I need to enforce a has_one / has_many relationship in order to be able to pull a DropdownField instead. But maybe I'm wrong making that assumption.
The end result i'm desiring is a drop down box of available groups instead of a checkboxset on the registration form, so if there is a more direct approach to achieving this I'm all ears...
Any ideas?