Judging from various questions here it appears possible to remove a contact from a group using a webform. e.g. See this question. But 'how?' I have added the group to the webform and want to give the user a checkbox so they have the option to be removed from the group. But I'm stumped as to the next step. What component can be configured to link to the group? I've added a 'select options' component but can't see how it can be configured.
-
have you 'added the group to the webform' (as you say) or have you added Group as 'user selects' (and then limiting the choice of groups showing on the form via editing the component) which is what the other answer implies– petednz - fuzion ♦Commented Feb 1, 2018 at 20:13
-
ah yes - as Pete says. I'm sure that comment wasn't there when I started my answer!– Aidan ♦Commented Feb 1, 2018 at 20:36
Add a comment
|
1 Answer
- On the CiviCRM tab of webform, add a contact using Existing contact
- Set Enable Groups and Tags to Yes
- In the Groups box, choose -User Select-
If you don't want all the groups showing:
- Go to the 'Webform' tab
- Click 'Edit' for the Groups component
- Select 'Static Options' and choose which groups to show
When the form is loaded with an existing contact, the checkboxes corresponding to the existing groups should be ticked. Untick and save to remove from the group.
-
Thanks, Aidan & Pete that's helpful. Actually what I wanted was to have a contact removed from one group and added to another as a result of completing the webform. I'm not sure that is possible, this method will work for the removal but then precludes adding a contact to a group. This is for GDPR so when people confirm using the webform they are removed from 'pre-confirms' group to 'confirms'. I guess there must be another way to do this! Commented Feb 1, 2018 at 20:53
-
Andy, in that case, try just enabling 'pre-confirms' and 'confirms', untick the 'multiple' option so that they become radio buttons. That will have the effect of removing from one group and adding to the other. You can change the labels to make it more user friendly. You could try experimenting with other widget types too.– Aidan ♦Commented Feb 2, 2018 at 8:42