Answers.Body: <p>Assuming you're using static groups, one way could be to switch from static groups to <a href="https://docs.civicrm.org/user/en/latest/organising-your-data/smart-groups/" rel="nofollow noreferrer">Smart Groups</a>, which would automatically add new contacts to one or more groups based on the search criteria you specify in each smart group query.</p>
  <p>You would have to convert your static groups to smart groups by associating a saved search (via SearchKit) to the existing static group, but that's pretty easy to do.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-05-15T12:23:00.390Z
Answers.Text: Thank you for your reply. I have solved the problem as follows:
  As we have two ways of creating new contacts, a diversion was necessary. FormBuilder on the dashlet and profiles. The FormBuilder cannot assign any group membership to the contacts created. I have therefore introduced a user-defined "Authorisations" field (checkboxes). This field then leads through the Searchkit to the dynamic group that I was able to set in the ACLs.
  
  In this way, a contact can also be assigned to several authorised persons, which was necessary for us.
  
  Translated with DeepL.com (free version)
Answers.UserDisplayName: Gregor
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-05-15T13:00:11.013Z
Answers.Text: Glad you got it to work!
Answers.UserDisplayName: Justin657
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-05-06T17:32:12.447Z
Answers.LastActivityDate: 2024-05-06T17:32:12.447Z
Answers.UserDisplayName: Justin657
Body: <p>I have built a dashlet with the form builder to create contacts. It is important for various reasons that this is the only way logged-in users can create new contacts.</p>
  <p>Recently I assigned authorisations via the ACL roles. Unfortunately, the users can no longer see and edit the contacts they have created with this dashlet because the contacts are not assigned to the correct groups.</p>
  <p>How can I set the group membership in the dashlet, preferably by default?</p>
  <p>LG
  Gregor</p>
  
Tags: <formbuilder><dashlet>
Title: Create contacts via dashlet and group membership
ThreadText: # Create contacts via dashlet and group membership
  
  (Asked by: username_0 on 2024-05-06)
  
  I have built a dashlet with the form builder to create contacts. It is important for various reasons that this is the only way logged-in users can create new contacts.
  
  Recently I assigned authorisations via the ACL roles. Unfortunately, the users can no longer see and edit the contacts they have created with this dashlet because the contacts are not assigned to the correct groups.
  
  How can I set the group membership in the dashlet, preferably by default?
  
  LG
  username_0
  
  **Tags:** formbuilder, dashlet
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-05-06. Score: 1 | Accepted answer
  
  Assuming you're using static groups, one way could be to switch from static groups to [Smart Groups](https://docs.civicrm.org/user/en/latest/organising-your-data/smart-groups/), which would automatically add new contacts to one or more groups based on the search criteria you specify in each smart group query.
  
  You would have to convert your static groups to smart groups by associating a saved search (via SearchKit) to the existing static group, but that's pretty easy to do.
  
  > **Comments:**
  > **username_0**: Thank you for your reply. I have solved the problem as follows: As we have two ways of creating new contacts, a diversion was necessary. FormBuilder on the dashlet and profiles. The FormBuilder cannot assign any group membership to the contacts created. I have therefore introduced a user-defined "Authorisations" field (checkboxes). This field then leads through the Searchkit to the dynamic group that I was able to set in the ACLs.  In this way, a contact can also be assigned to several authorised persons, which was necessary for us.  Translated with DeepL.com (free version)  
  > **username_1**: Glad you got it to work!  
  
  ---
  
  