We have two profiles that complete the membership registration. One profile for the organization which links to the second profile which is the employee.
We also have three public groups:
Directory group that lists the organzation on our website
Events group that emails employees about our upcoming events
Newsletter group which emails employees our newsletter.
The Directory group needs to have an opt in/out on the organizational profile
The two groups Events and Newsletter need to be on the employee profile and people need to be able to select one or both.
Currently I can't seem to be able to do this as I can only put all the groups on a profile.
I've read that you can achieve this with a hook but would like further help on how to do that.