Answers.Body: <p>I think the answer is that I turned on the 'on behalf of' option. When I do that on the demo site, I get this message:</p>
  <blockquote>
  <p>Allow individuals to contribute and / or signup for membership on
  behalf of an organization? You should move the membership related
  fields configured in 'Includes Profile (top of page)' to the 'On
  Behalf' profile for this Contribution Page</p>
  </blockquote>
  <p>The demo site is running a few versions later, so I suspect this is a known issue that has been resolved in recent versions.</p>
  <p>For my site, I believe that even though I turned off the on-behalf-of, there's something left behind that prevents the membership fields from being exposed.</p>
  <p>When I add the membership fields to the on-behalf-of profile they do show up on my site, so that does appear to be the origin of the issue and sort-of-work-around.</p>
  <p>In other words, because at some point I enabled the on-behalf-of-organization feature on the contribution page (and then disabled it later), I still have to put my custom membership fields in the on-behalf-of profile, and they don't show up otherwise.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-14T15:38:47.623Z
Answers.LastActivityDate: 2024-02-14T15:54:34.120Z
Answers.LastEditDate: 2024-02-14T15:54:34.120Z
Answers.UserDisplayName: Alan Dixon
Body: <p>On a very simple Drupal 10.1 + CiviCRM 5.69.2 site.</p>
  <p>Add a custom fieldset for memberships (e.g. with a simple text field).</p>
  <p>Include the custom field from that fieldset in a profile.</p>
  <p>That field does not show up when that profile is included on the contribution page [I tried a few permutations of putting it in it's own profile, including in a profile which includes other contact fields that do show up, etc.]</p>
  <p>Oddly, I thought it was showing up and now it isn't - not sure if that's due to a CiviCRM upgrade in the meantime or something else.</p>
  <p>BUT, I was not able to reproduce this behaviour on the demo site:</p>
  <p><a href="https://d10-master.demo.civicrm.org/civicrm/contribute/transact?reset=1&amp;id=2" rel="nofollow noreferrer">https://d10-master.demo.civicrm.org/civicrm/contribute/transact?reset=1&amp;id=2</a></p>
  <p>i.e. it's working there.</p>
  
Tags: <civimember><custom-fields><profile>
Title: Profile on contribution page doesn't show membership custom fields
ThreadText: # Profile on contribution page doesn't show membership custom fields
  
  (Asked by: username_0 on 2024-02-14)
  
  On a very simple Drupal 10.1 + CiviCRM 5.69.2 site.
  
  Add a custom fieldset for memberships (e.g. with a simple text field).
  
  Include the custom field from that fieldset in a profile.
  
  That field does not show up when that profile is included on the contribution page [I tried a few permutations of putting it in it's own profile, including in a profile which includes other contact fields that do show up, etc.]
  
  Oddly, I thought it was showing up and now it isn't - not sure if that's due to a CiviCRM upgrade in the meantime or something else.
  
  BUT, I was not able to reproduce this behaviour on the demo site:
  
  <https://d10-master.demo.civicrm.org/civicrm/contribute/transact?reset=1&id=2>
  
  i.e. it's working there.
  
  **Tags:** civimember, custom-fields, profile
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2024-02-14. Score: 1
  
  I think the answer is that I turned on the 'on behalf of' option. When I do that on the demo site, I get this message:
  
  > Allow individuals to contribute and / or signup for membership on
  > behalf of an organization? You should move the membership related
  > fields configured in 'Includes Profile (top of page)' to the 'On
  > Behalf' profile for this Contribution Page
  
  The demo site is running a few versions later, so I suspect this is a known issue that has been resolved in recent versions.
  
  For my site, I believe that even though I turned off the on-behalf-of, there's something left behind that prevents the membership fields from being exposed.
  
  When I add the membership fields to the on-behalf-of profile they do show up on my site, so that does appear to be the origin of the issue and sort-of-work-around.
  
  In other words, because at some point I enabled the on-behalf-of-organization feature on the contribution page (and then disabled it later), I still have to put my custom membership fields in the on-behalf-of profile, and they don't show up otherwise.
  
  
  ---
  
  