Answers.Body: <ul>
  <li>On the CiviCRM tab of webform, add a contact using <em>Existing contact</em></li>
  <li>Set <em>Enable Groups and Tags</em> to <em>Yes</em></li>
  <li>In the Groups box, choose <em>-User Select-</em></li>
  </ul>
  
  <p>If you don't want all the groups showing:</p>
  
  <ul>
  <li>Go to the 'Webform' tab</li>
  <li>Click 'Edit' for the <em>Groups</em> component</li>
  <li>Select 'Static Options' and choose which groups to show</li>
  </ul>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-01T20:53:05.650Z
Answers.Text: 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!
Answers.UserDisplayName: Andy Clark
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-02T08:42:55.963Z
Answers.Text: 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.
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-01T20:34:21.023Z
Answers.LastActivityDate: 2018-02-01T20:34:21.023Z
Answers.UserDisplayName: Aidan
Body: <p>Judging from various questions here it appears possible to remove a contact from a group using a webform. e.g. See <a href="https://civicrm.stackexchange.com/questions/17124/when-does-civicrm-webform-remove-you-from-groups">this question</a>. 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.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-01T20:13:31.297Z
Comments.Text: 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
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-01T20:36:50.477Z
Comments.Text: ah yes - as Pete says.  I'm sure that comment wasn't there when I started my answer!
Comments.UserDisplayName: Aidan
Tags: <drupal><webform-civicrm><4.7>
Title: How to remove a contact from a group with Webform?
ThreadText: # How to remove a contact from a group with Webform?
  
  (Asked by: username_0 on 2018-02-01)
  
  Judging from various questions here it appears possible to remove a contact from a group using a webform. e.g. See [this question](https://civicrm.stackexchange.com/questions/17124/when-does-civicrm-webform-remove-you-from-groups). 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.
  
  **Tags:** drupal, webform-civicrm, 4.7
  
  > **Comments:**
  > **username_1**: 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  
  > **username_2**: ah yes - as Pete says.  I'm sure that comment wasn't there when I started my answer!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-02-01. Score: 1
  
  * 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.
  
  > **Comments:**
  > **username_0**: Thanks, username_2 & 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!  
  > **username_2**: username_0, 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.  
  
  ---
  
  