Answers.Body: <p>For admins we tend to provide them with a View, or even a View block 'search' so that they can quickly find the person who will be cid=1 and then provide a link on that to the webform so cid=1 is in the url and all related contacts on the form also prefill.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-24T20:34:30.887Z
Answers.LastActivityDate: 2015-09-24T20:34:30.887Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>Prefilling a webform value depends on other values already being there. If the individual is not selected at the time the webform loads, then there's no way for it to populate the household. So you are correct, selecting a different contact 1 on the form will not cause contact 2 to be changed.</p>
  
  <p>One workaround would be to create 2 webforms - the fist one being an incredibly simple form that allows you to autocomplete the individual's name and a submit button that redirects you to form 2 with cid in the url. Not perfect but it would work.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-10T20:51:00.683Z
Answers.Text: I think a multi-page form can also do this, right? (ie. the first contact is on page one, then when they go to page two it prefills by relationship from the first page)
Answers.UserDisplayName: Laryn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-24T20:02:47.810Z
Answers.LastActivityDate: 2015-09-24T20:02:47.810Z
Answers.UserDisplayName: Coleman
Answers.Body: <p>"In the webform, if I select an existing household, it pulls up the info on the hh but does not populate the individual info."</p>
  
  <p>In the webform component for the 'individual existing contact' field you need to set the Filter so that it will prefill if it can find a contact by specifying the relationship.</p>
  
  <p>Is that a step you might have missed?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-21T07:13:02.690Z
Answers.Text: Hmm, I didn't do that, somehow missed that.  (It looks like it's not the filter but default value).  Now it will save a new contact correctly but it still won't pull up an existing individual that is a household member of contact 1.
Answers.UserDisplayName: Paul-Tahoe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-21T09:41:10.603Z
Answers.Text: hmm  - if this is a problem similar to the one i describe here it may help if you can explain in detail your set up there. https://www.drupal.org/node/2383011. Just to confirm, if you go to the url with cid1=<id of household> do the related people prefill?
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-21T09:49:46.483Z
Answers.Text: Interesting.  It does work if you add the cid to the url, but not if you select the hh from webform.  Of course, I'd like to select the household.  I'm updated a number of people.  In the morning I'll  detail how it's set up.
Answers.UserDisplayName: Paul-Tahoe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-20T20:02:20.230Z
Answers.LastActivityDate: 2015-09-20T20:02:20.230Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>Unless you have some very unusual circumstances, you should not make Contact 1 a household. Contact 1 is meant to represent the person filling out the form (e.g. the user) and houses are generally unable to operate a keyboard ;)</p>
  
  <p>I suggest making contact 1 an individual and contact 2 the household.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-23T23:01:56.273Z
Answers.Text: Very true.  I had tried that first and it didn't work any better.  Then I thought I'd try with a completely new webform and the other direction in case that worked better.  I just tried again with contact1 ind and contact2 hh and it still only pulls up the hh if I give the cid.
Answers.UserDisplayName: Paul-Tahoe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-24T00:01:58.370Z
Answers.Text: Oops I see I left out of the last sentence  and got another wrong and it won't let me edit it.  Should be:   it still only pulls up the ind unless I give the cid
Answers.UserDisplayName: Paul-Tahoe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-24T02:39:19.207Z
Answers.Text: It's true, prefilling a value depends on other values already being there. If the individual is not selected at the time the webform loads, then there's no way for it to populate the household. So you are correct, selecting a different contact 1 on the form will not cause contact 2 to be changed.
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-24T16:21:21.097Z
Answers.Text: So if I read this correctly, webforms can really only be used for new data or if you send a link to the person for them to update their info directly.  If an admin type  wishes to view and possibly update an individual and its household, they can't use webforms (well unless they know the cid).  I hope I'm missing something.
Answers.UserDisplayName: Paul-Tahoe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-24T19:58:40.823Z
Answers.Text: Correct. Pre-filled information only works with information that's known at the time the form renders.
  
  See 2nd answer for a potential workaround.
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-25T02:35:10.667Z
Answers.Text: The webform stuff is cool but this "feature" seems like something no one would want.  Is there a use case that someone would select a contact and not want to see any relationships that ind has?  Even if I wanted to add a new one, I'd still want to see the existing one.  Then click X and enter the new one.  Is it hard to have it re-render the form after you select a name?  Would behavior would the average user expect?
Answers.UserDisplayName: Paul-Tahoe
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-23T18:41:36.950Z
Answers.LastActivityDate: 2015-09-23T18:41:36.950Z
Answers.UserDisplayName: Coleman
Body: <p>I tried to follow the instructions here <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Webform+CiviCRM+Integration" rel="nofollow">http://wiki.civicrm.org/confluence/display/CRMDOC/Webform+CiviCRM+Integration</a> but I must be doing something wrong.</p>
  
  <p>I created a webform that has household as contact 1 and individual as contact 2.  In contact 2, I enabled relationship fields and selected is part of.  </p>
  
  <p>In the webform, if I select an existing household, it pulls up the info on the hh but does not populate the individual info.</p>
  
  <p>If I create a new household and a new individual, it creates the household and the individual and a relationship but the relationship doesn't have a type, which isn't possible through the standard interface.</p>
  
  <p>This is on civicrm 4.6.7</p>
  
Tags: <webform-civicrm>
Title: How can I get webforms to show household and household members?
ThreadText: # How can I get webforms to show household and household members?
  
  (Asked by: username_0 on 2015-09-20)
  
  I tried to follow the instructions here <http://wiki.civicrm.org/confluence/display/CRMDOC/Webform+CiviCRM+Integration> but I must be doing something wrong.
  
  I created a webform that has household as contact 1 and individual as contact 2. In contact 2, I enabled relationship fields and selected is part of.
  
  In the webform, if I select an existing household, it pulls up the info on the hh but does not populate the individual info.
  
  If I create a new household and a new individual, it creates the household and the individual and a relationship but the relationship doesn't have a type, which isn't possible through the standard interface.
  
  This is on civicrm 4.6.7
  
  **Tags:** webform-civicrm
  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_1 on 2015-09-24. Score: 3
  
  For admins we tend to provide them with a View, or even a View block 'search' so that they can quickly find the person who will be cid=1 and then provide a link on that to the webform so cid=1 is in the url and all related contacts on the form also prefill.
  
  
  ---
  
  ### Answer by username_2 on 2015-09-24. Score: 3
  
  Prefilling a webform value depends on other values already being there. If the individual is not selected at the time the webform loads, then there's no way for it to populate the household. So you are correct, selecting a different contact 1 on the form will not cause contact 2 to be changed.
  
  One workaround would be to create 2 webforms - the fist one being an incredibly simple form that allows you to autocomplete the individual's name and a submit button that redirects you to form 2 with cid in the url. Not perfect but it would work.
  
  > **Comments:**
  > **username_3**: I think a multi-page form can also do this, right? (ie. the first contact is on page one, then when they go to page two it prefills by relationship from the first page)  
  
  ---
  
  ### Answer by username_1 on 2015-09-20. Score: 1
  
  "In the webform, if I select an existing household, it pulls up the info on the hh but does not populate the individual info."
  
  In the webform component for the 'individual existing contact' field you need to set the Filter so that it will prefill if it can find a contact by specifying the relationship.
  
  Is that a step you might have missed?
  
  > **Comments:**
  > **username_0**: Hmm, I didn't do that, somehow missed that.  (It looks like it's not the filter but default value).  Now it will save a new contact correctly but it still won't pull up an existing individual that is a household member of contact 1.  
  > **username_1**: hmm  - if this is a problem similar to the one i describe here it may help if you can explain in detail your set up there. https://www.drupal.org/node/2383011. Just to confirm, if you go to the url with cid1=<id of household> do the related people prefill?  
  > **username_0**: Interesting.  It does work if you add the cid to the url, but not if you select the hh from webform.  Of course, I'd like to select the household.  I'm updated a number of people.  In the morning I'll  detail how it's set up.  
  
  ---
  
  ### Answer by username_2 on 2015-09-23. Score: 1
  
  Unless you have some very unusual circumstances, you should not make Contact 1 a household. Contact 1 is meant to represent the person filling out the form (e.g. the user) and houses are generally unable to operate a keyboard ;)
  
  I suggest making contact 1 an individual and contact 2 the household.
  
  > **Comments:**
  > **username_0**: Very true.  I had tried that first and it didn't work any better.  Then I thought I'd try with a completely new webform and the other direction in case that worked better.  I just tried again with contact1 ind and contact2 hh and it still only pulls up the hh if I give the cid.  
  > **username_0**: Oops I see I left out of the last sentence  and got another wrong and it won't let me edit it.  Should be:   it still only pulls up the ind unless I give the cid  
  > **username_2**: It's true, prefilling a value depends on other values already being there. If the individual is not selected at the time the webform loads, then there's no way for it to populate the household. So you are correct, selecting a different contact 1 on the form will not cause contact 2 to be changed.  
  > **username_0**: So if I read this correctly, webforms can really only be used for new data or if you send a link to the person for them to update their info directly.  If an admin type  wishes to view and possibly update an individual and its household, they can't use webforms (well unless they know the cid).  I hope I'm missing something.  
  > **username_2**: Correct. Pre-filled information only works with information that's known at the time the form renders.  See 2nd answer for a potential workaround.  
  > **username_0**: The webform stuff is cool but this "feature" seems like something no one would want.  Is there a use case that someone would select a contact and not want to see any relationships that ind has?  Even if I wanted to add a new one, I'd still want to see the existing one.  Then click X and enter the new one.  Is it hard to have it re-render the form after you select a name?  Would behavior would the average user expect?  
  
  ---
  
  