Answers.Body: <p>You have to set that in the "CiviCRM" tab of the webform, when you add the field to the form (or choose "User select" for the "Address Location") here:
  <img src="https://i.sstatic.net/w1WAN.jpg" alt="Webform-CiviCRM address fields"></p>
  
  <p>You may be able to allow this to be set via the URL with some combination of "User Select" and the webform component's "Default value" (if you can add a $_GET variable as the default).</p>
  
  <p>I believe that the first address field is always designated as primary in Webform CiviCRM at the moment (hard-coded/non-configurable).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-07T15:48:00.550Z
Answers.LastActivityDate: 2015-04-07T15:48:00.550Z
Answers.UserDisplayName: Laryn
Answers.Body: <p>The short answer is "no". Location types are handled in a very simple/dumb way by webform integration. When it looks up a contact it simply pulls all addresses (primary first, otherwise in no particular order) and populates address fields with them in order, and with no respect to location type settings for those fields (so the suggestion of pulling a default from $_GET wouldn't help you I'm afraid).</p>
  
  <p>There is an <a href="https://www.drupal.org/node/1503012" rel="nofollow">open issue</a> for improving this if you'd like to contribute.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-18T15:01:11.493Z
Answers.Text: @pmoz - I think this is the correct answer to your question albiet leaving you unsatisfied.  please check as answered or ask another / modify ...
Answers.UserDisplayName: Sonicthoughts
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-07T17:45:58.910Z
Answers.LastActivityDate: 2015-04-07T17:45:58.910Z
Answers.UserDisplayName: Coleman
Body: <p>Searched diligently before posting this but couldn't find an answer.</p>
  
  <p>I'm working on a webform/view combo to edit contact's addresses.</p>
  
  <p>I'm having trouble figuring out how to pass the location id in the url to the webform.</p>
  
  <p>If I use node/(webform node number)?cid2=[id] it opens the webform with the primary address which works fine if contacts only have one address in the system.</p>
  
  <p>Is it possible to pass the location id in the url for the webform?</p>
  
Tags: <webform-civicrm><drupal-views>
Title: Edit address using webform and views
ThreadText: # Edit address using webform and views
  
  (Asked by: username_0 on 2015-04-07)
  
  Searched diligently before posting this but couldn't find an answer.
  
  I'm working on a webform/view combo to edit contact's addresses.
  
  I'm having trouble figuring out how to pass the location id in the url to the webform.
  
  If I use node/(webform node number)?cid2=[id] it opens the webform with the primary address which works fine if contacts only have one address in the system.
  
  Is it possible to pass the location id in the url for the webform?
  
  **Tags:** webform-civicrm, drupal-views
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2015-04-07. Score: 3 | Accepted answer
  
  The short answer is "no". Location types are handled in a very simple/dumb way by webform integration. When it looks up a contact it simply pulls all addresses (primary first, otherwise in no particular order) and populates address fields with them in order, and with no respect to location type settings for those fields (so the suggestion of pulling a default from $\_GET wouldn't help you I'm afraid).
  
  There is an [open issue](https://www.drupal.org/node/1503012) for improving this if you'd like to contribute.
  
  > **Comments:**
  > **username_3**: @username_0 - I think this is the correct answer to your question albiet leaving you unsatisfied.  please check as answered or ask another / modify ...  
  
  ---
  
  ### Answer by username_1 on 2015-04-07. Score: 1
  
  You have to set that in the "CiviCRM" tab of the webform, when you add the field to the form (or choose "User select" for the "Address Location") here:
  ![Webform-CiviCRM address fields](https://i.sstatic.net/w1WAN.jpg)
  
  You may be able to allow this to be set via the URL with some combination of "User Select" and the webform component's "Default value" (if you can add a $\_GET variable as the default).
  
  I believe that the first address field is always designated as primary in Webform CiviCRM at the moment (hard-coded/non-configurable).
  
  
  ---
  
  