Answers.Body: <p>We tried the suggestion to </p>
  
  <blockquote>
    <p>hack /srv/www/yfnz/yfnz.fudev.co.nz/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Main.php
    line 33 $removeCustomFieldTypes = array('Contribution', 'Membership');
    needs to be changed to be $removeCustomFieldTypes = array('Contribution');</p>
  </blockquote>
  
  <p>and it did what we needed.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-24T01:36:44.020Z
Answers.LastActivityDate: 2017-02-24T01:36:44.020Z
Answers.UserDisplayName: Gemma - Fuzion
Body: <p>There was a discussion on the <a href="https://forum.civicrm.org/index.php?topic=30691.0" rel="nofollow noreferrer">forum here</a> - which suggested that the reason this happened was because Contributions should alway be loading fresh data.</p>
  
  <p>The jury seemed to be out on whether that should be default behaviour for Member fields.</p>
  
  <p>Our scenario is members join up, and use Contact Reference field to assign themselves to a club (and then we build a Relationship from that).</p>
  
  <p>When the member renews we absolutely want this data loading.</p>
  
  <p>My feeling is this should be core behaviour but would be good to canvass opinions on this.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-24T18:43:10.837Z
Comments.Text: Agreed. If custom Membership fields are exposed on a form they should be pre-filled with the current value.
Comments.UserDisplayName: David Hepper
Tags: <civimember><custom-fields><contribution-page>
Title: Why do custom fields on Membership not pre-load when a member is renewing
ThreadText: # Why do custom fields on Membership not pre-load when a member is renewing
  
  (Asked by: username_0 on 2017-02-24)
  
  There was a discussion on the [forum here](https://forum.civicrm.org/index.php?topic=30691.0) - which suggested that the reason this happened was because Contributions should alway be loading fresh data.
  
  The jury seemed to be out on whether that should be default behaviour for Member fields.
  
  Our scenario is members join up, and use Contact Reference field to assign themselves to a club (and then we build a Relationship from that).
  
  When the member renews we absolutely want this data loading.
  
  My feeling is this should be core behaviour but would be good to canvass opinions on this.
  
  **Tags:** civimember, custom-fields, contribution-page
  
  > **Comments:**
  > **username_1**: Agreed. If custom Membership fields are exposed on a form they should be pre-filled with the current value.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-02-24. Score: 1
  
  We tried the suggestion to
  
  > hack /srv/www/yfnz/yfnz.fudev.co.nz/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Main.php
  > line 33 $removeCustomFieldTypes = array('Contribution', 'Membership');
  > needs to be changed to be $removeCustomFieldTypes = array('Contribution');
  
  and it did what we needed.
  
  
  ---
  
  