Answers.Body: <p>It looks possible by editing the Workflow Message Template for online receipts. (Thanks @RebeccaTregenna for hint) This is written in Smarty code.</p>
  
  <p>There are two options:</p>
  
  <ol>
  <li>Remove all customPre and customPost sections.</li>
  <li>Add logic to identify the fields you don't want and filter those out.</li>
  </ol>
  
  <p>Making these changes is difficult, it's code with logic, there's no validation either, so easy to make a mistake or delete the wrong bit. <strong>So save a copy of the original version before you make changes!</strong></p>
  
  <p>I went for (1) for the time being because we had so many extra fields that just listing them would have been time consuming. Also, as we can only filter on the field's label, were anyone to tweak that slightly the logic would fail and that would start getting output without us knowing. Also, I wasn't sure <em>any</em> of the fields were really needed in the receipt, so I took a conservative approach (as in erred on the safe side, <del>as opposed to a <em>Conservatives</em> approach which is to err on the <em>unsafe</em> side and not take coronavirus seriously until it's too late</del>)</p>
  
  <p>Looking at the template code, it already includes code for selectively removing fields defined in a <code>$trackingFields</code> array, however I can't see that that is ever defined anywhere.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-25T22:34:13.270Z
Answers.Text: LOL 12345678910 (stupid limit of minimum characters)
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-24T16:12:50.347Z
Answers.LastActivityDate: 2020-04-24T16:12:50.347Z
Answers.UserDisplayName: artfulrobot
Body: <p>We collect a lot of data from people who buy a membership using a Contribution Page. The confirmation/thank you email includes all of that data, which is a problem: some of the data we collect is not suitable for being emailed.</p>
  
  <p>Is there a way to restrict/limit/choose what fields are included in the thank you emails for this contribution page?</p>
  
  <p>We're on 5.24.3.</p>
  
Tags: <civicontribute><receipts>
Title: How to limit/choose what profile data is included in confirmation emails?
ThreadText: # How to limit/choose what profile data is included in confirmation emails?
  
  (Asked by: username_0 on 2020-04-23)
  
  We collect a lot of data from people who buy a membership using a Contribution Page. The confirmation/thank you email includes all of that data, which is a problem: some of the data we collect is not suitable for being emailed.
  
  Is there a way to restrict/limit/choose what fields are included in the thank you emails for this contribution page?
  
  We're on 5.24.3.
  
  **Tags:** civicontribute, receipts
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-04-24. Score: 0
  
  It looks possible by editing the Workflow Message Template for online receipts. (Thanks @RebeccaTregenna for hint) This is written in Smarty code.
  
  There are two options:
  
  1. Remove all customPre and customPost sections.
  2. Add logic to identify the fields you don't want and filter those out.
  
  Making these changes is difficult, it's code with logic, there's no validation either, so easy to make a mistake or delete the wrong bit. **So save a copy of the original version before you make changes!**
  
  I went for (1) for the time being because we had so many extra fields that just listing them would have been time consuming. Also, as we can only filter on the field's label, were anyone to tweak that slightly the logic would fail and that would start getting output without us knowing. Also, I wasn't sure *any* of the fields were really needed in the receipt, so I took a conservative approach (as in erred on the safe side, ~~as opposed to a *Conservatives* approach which is to err on the *unsafe* side and not take coronavirus seriously until it's too late~~)
  
  Looking at the template code, it already includes code for selectively removing fields defined in a `$trackingFields` array, however I can't see that that is ever defined anywhere.
  
  > **Comments:**
  > **username_1**: LOL 12345678910 (stupid limit of minimum characters)  
  
  ---
  
  