Details
-
Type: New Feature
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: None
-
Fix Version/s: Quest-PA
-
Component/s: None
-
Labels:None
Description
Site administrators need a way to configure a given profile so that it automatically assigns the new contact to a specific group For Quest, we will use this to automatically put newly registering applicants (users) into a "Students" group.
1. Add new column/property to UF_GROUP to store the optional civicrm_group_id Foreign Key
add_to_group_id INT NULL FK to civicrm_group.id
2. Add <select> field to Profile Settings form to pick a group. Label = "Add Contacts to Group"
3. When profile form ("profile/edit", my account, user reg) profiles w/ NON-Null values for this new column are rendered - include a hidden HTML field which will cause the form-handler to add the contact to the specified group. I believe an example of this would be:
<input name="group[2]" type="hidden" value="1">
.... for group.id = 2
4. Add logic to delete_group function to set matching uf_group.add_to_group_id values back to NULL when a group is deleted.