Answers.Body: <p>If you prefer editing a file to GUI clicking, you could try the <a href="http://drupal.org/project/node_export" rel="nofollow">node_export</a> module: export your existing webform as a text file, edit it very carefully, and import it as a new webform.</p>
  
  <p>On a simple 2 contact POC, I removed the components with form_keys starting civicrm_1, then renamed the civicrm_2 form_keys to civicrm_1. In the webform_civicrm contacts array, I removed the first contact.  The imported form seems ok. </p>
  
  <p>You might need to do more on a complex form.</p>
  
  <p>Some features depend on the order of contacts (eg relationships are only possible with earlier contacts) so shuffling the order could cause problems.  </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-30T20:24:05.367Z
Answers.Text: nice suggestion
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-28T09:36:29.163Z
Answers.LastActivityDate: 2016-04-28T09:36:29.163Z
Answers.UserDisplayName: Aidan
Answers.Body: <p>Sorry, the module does not have any mechanism for reordering contacts. The only solution is to reconfigure the contacts manually. Since you are wanting to add a new contact #1 and get rid of contact #2, you don't have to mess with #3 or #4 - they can stay put. Just configure #2 to have all the properties of #1, and then change #1 to be like the new contact you are wanting to add.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-27T20:03:09.447Z
Answers.LastActivityDate: 2016-04-27T20:03:09.447Z
Answers.UserDisplayName: Coleman
Answers.Body: <p>I found some solutions, so I answer my own question :</p>
  
  <p>In fact, reordering or deleting the Contacts in the CIVICRM tab has no importance, since it can be done in the WEBFORM tab.</p>
  
  <p>... except for the first (primary) one, which is "Usually assumed to be the person filling out the form" : if you want to change (reorder) it, the solution I found is to clone this primary contact (in the WEBFORM tab), then modify it to become what you want (the clone has not this property)</p>
  
  <p>... somewhat what Coleman proposes above (thanks)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-30T08:05:38.677Z
Answers.LastActivityDate: 2016-04-30T08:05:38.677Z
Answers.UserDisplayName: Jacques-Marie Moranne
Answers.Body: <p>OK - massive get out of jail card thanks to Jacques. Here is my scenario and how i dealt with it.
  Contact 1 was not current user (it has started off as a public form and then modified for admins to use).</p>
  
  <p>It had a gazzillion fields, fieldsets and layout boxes.</p>
  
  <p>CID 2 was the current employer. What i need was cid1 to be current user, cid2 to be a clone of what cid1 had been, and cid3 to be current employer.</p>
  
  <ul>
  <li><p>reset civi tab to only have 1 contact (may not have been necessary)</p></li>
  <li><p>deleted cid 2 via webform components</p></li>
  <li><p>added a new field to cid 1 as i had already thrown away its fieldset :( - and smile because i know that adding any new field will recreate the fieldset, which is a pain many times, but this time made me happy</p></li>
  <li><p>drag all the fields, fieldsets and layout boxes back in to the new cid 1 fieldset which last step recreated</p></li>
  <li><p>check. all looks good. clone contact 1 fieldset via webform tab</p></li>
  <li><p>check that cid 2 is now copy, it is, yay</p></li>
  <li><p>on civi tab, remove all fields for cid 1 other than 'existing contact' (using the 'select none' for each field group rather than lots of clicking - thanks coleman!)</p></li>
  <li><p>drag all fieldsets and layouts for cid 1 in to a single fieldset so i only have to hit delete once (perhaps i could have combined this and previous set rather than doing above via civi tab)</p></li>
  <li><p>set civi tab to have a 3 contact and set that to be the employer of 2</p>
  
  <ul>
  <li>chill.</li>
  </ul></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-05T09:09:15.833Z
Answers.LastActivityDate: 2016-05-05T09:14:34.320Z
Answers.LastEditDate: 2016-05-05T09:14:34.320Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>I have developped a complex Webform with 4 Contacts.</p>
  
  <p>I want to delete Contact #2 :
  I can delete it in the "Webform" Tab, but it remains in the "CiviCRM" Tab : how can I delete it also in the CiviCRM Tab ?</p>
  
  <p>I also would like to create a New Contact #1 (just before the current #1) : How can I do that ?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-27T19:29:49.220Z
Comments.Text: As far as I know this is not possible but happy to find out that it is as it avoids having to rebuild webforms when one realises the logic of who is what contact needs changing.
Comments.UserDisplayName: petednz - fuzion
Tags: <webform-civicrm>
Title: How to delete/reorder a Contact from a Webform
ThreadText: # How to delete/reorder a Contact from a Webform
  
  (Asked by: username_0 on 2016-04-27)
  
  I have developped a complex Webform with 4 Contacts.
  
  I want to delete Contact #2 :
  I can delete it in the "Webform" Tab, but it remains in the "CiviCRM" Tab : how can I delete it also in the CiviCRM Tab ?
  
  I also would like to create a New Contact #1 (just before the current #1) : How can I do that ?
  
  **Tags:** webform-civicrm
  
  > **Comments:**
  > **username_1**: As far as I know this is not possible but happy to find out that it is as it avoids having to rebuild webforms when one realises the logic of who is what contact needs changing.  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_2 on 2016-04-28. Score: 3
  
  If you prefer editing a file to GUI clicking, you could try the [node\_export](http://drupal.org/project/node_export) module: export your existing webform as a text file, edit it very carefully, and import it as a new webform.
  
  On a simple 2 contact POC, I removed the components with form\_keys starting civicrm\_1, then renamed the civicrm\_2 form\_keys to civicrm\_1. In the webform\_civicrm contacts array, I removed the first contact. The imported form seems ok.
  
  You might need to do more on a complex form.
  
  Some features depend on the order of contacts (eg relationships are only possible with earlier contacts) so shuffling the order could cause problems.
  
  > **Comments:**
  > **username_1**: nice suggestion  
  
  ---
  
  ### Answer by username_3 on 2016-04-27. Score: 3
  
  Sorry, the module does not have any mechanism for reordering contacts. The only solution is to reconfigure the contacts manually. Since you are wanting to add a new contact #1 and get rid of contact #2, you don't have to mess with #3 or #4 - they can stay put. Just configure #2 to have all the properties of #1, and then change #1 to be like the new contact you are wanting to add.
  
  
  ---
  
  ### Answer by username_0 on 2016-04-30. Score: 1
  
  I found some solutions, so I answer my own question :
  
  In fact, reordering or deleting the Contacts in the CIVICRM tab has no importance, since it can be done in the WEBFORM tab.
  
  ... except for the first (primary) one, which is "Usually assumed to be the person filling out the form" : if you want to change (reorder) it, the solution I found is to clone this primary contact (in the WEBFORM tab), then modify it to become what you want (the clone has not this property)
  
  ... somewhat what username_3 proposes above (thanks)
  
  
  ---
  
  ### Answer by username_1 on 2016-05-05. Score: 0
  
  OK - massive get out of jail card thanks to Jacques. Here is my scenario and how i dealt with it.
  Contact 1 was not current user (it has started off as a public form and then modified for admins to use).
  
  It had a gazzillion fields, fieldsets and layout boxes.
  
  CID 2 was the current employer. What i need was cid1 to be current user, cid2 to be a clone of what cid1 had been, and cid3 to be current employer.
  
  * reset civi tab to only have 1 contact (may not have been necessary)
  * deleted cid 2 via webform components
  * added a new field to cid 1 as i had already thrown away its fieldset :( - and smile because i know that adding any new field will recreate the fieldset, which is a pain many times, but this time made me happy
  * drag all the fields, fieldsets and layout boxes back in to the new cid 1 fieldset which last step recreated
  * check. all looks good. clone contact 1 fieldset via webform tab
  * check that cid 2 is now copy, it is, yay
  * on civi tab, remove all fields for cid 1 other than 'existing contact' (using the 'select none' for each field group rather than lots of clicking - thanks coleman!)
  * drag all fieldsets and layouts for cid 1 in to a single fieldset so i only have to hit delete once (perhaps i could have combined this and previous set rather than doing above via civi tab)
  * set civi tab to have a 3 contact and set that to be the employer of 2
  
    + chill.
  
  
  ---
  
  