CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Hiding Profile from Event Confirmation Email
Pages: [1]

Author Topic: Hiding Profile from Event Confirmation Email  (Read 804 times)

smallbiz

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Joomla 2.5, 3.3
  • MySQL version: 5
  • PHP version: 5.2
Hiding Profile from Event Confirmation Email
March 27, 2012, 02:27:25 pm
Due to confidentially requirements, I'd like to hide the information from the profile fields in event confirmation emails.

I see in 3.4.8 there is access to system workflow email templates, and one of this is entitled: Events - Registration Confirmation and Receipt (on-line)


And I see code that reads:

{foreach from=$eachParticipant item=eachProfile key=pid}
{$customProfile.title.$pid}
{foreach from=$eachProfile item=val key=field}
{foreach from=$val item=v key=f}
{$field}: {$v}
{/foreach}
{/foreach}
{/foreach}
{/foreach}

If I remove this from the template, will my event confirmation emails no longer show the profile fields that the user completed?


CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Hiding Profile from Event Confirmation Email
March 28, 2012, 01:14:32 am
I believe so.  But best way to find out is to edit your template and do a testing registration yourself.  If it doesn't work you can always 'revert to default' and get the template back.

If you've already modified the template, just make a backup.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Alex Sondy

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.0.7
  • CMS version: Drupal 7.2
  • MySQL version: 5.0.7
  • PHP version: 5.3.5
Re: Hiding Profile from Event Confirmation Email
May 31, 2012, 10:48:18 am
Hey, I have the exact same Problem. I need to hide confidential information (one specific Profile) in the Registration Confirmation Email.

It would be awesome if you could share your solution.

thank you

smallbiz

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Joomla 2.5, 3.3
  • MySQL version: 5
  • PHP version: 5.2
Re: Hiding Profile from Event Confirmation Email
January 10, 2014, 07:24:52 am
Wondering if anyone can shed some light on how to hide a specific profile from the confirmation email???

smallbiz

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Joomla 2.5, 3.3
  • MySQL version: 5
  • PHP version: 5.2
[RESOLVED] Re: Hiding Profile from Event Confirmation Email
February 21, 2014, 01:42:51 pm
I had a few custom fields in a profile that I wished to hide.

In Administer civiCRM->Message Templates, I edited the template:
Events - Registration Confirmation and Receipt (on-line)

For the text version, I updated this code block with the if $customName condition
Code: [Select]
{foreach from=$customPos item=customValue key=customName}
{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
 {* START HIDE FIELDS *}
    {if $customName != 'Credit Card Number' and $customName != 'Security code' and $customName != 'Expiry Month (MM)' and $customName != 'Expiry Year (YY)'}
 {$customName}: {$customValue}
    {/if}
  {* END HIDE FIELDS *}
{/if}
{/foreach}

And for the HTML version:
Code: [Select]
   <tr> <th {$headerStyle}>{$customPost_grouptitle.$j}</th></tr>
   {foreach from=$customPos item=customValue key=customName}
   {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
    {* START HIDE FIELDS *}
    {if $customName != 'Credit Card Number' and $customName != 'Security code' and $customName != 'Expiry Month (MM)' and $customName != 'Expiry Year (YY)'}
     <tr>
         <td {$labelStyle}>{$customName}</td>
         <td {$valueStyle}>{$customValue}</td>
     </tr>
    {/if}
     {* END HIDE FIELDS *}
{/if}

To hide a specific profile, one could put a condition around $customPost_grouptitle (where you'd check for the name of the custom profile).

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Hiding Profile from Event Confirmation Email
February 21, 2014, 02:27:07 pm
thanks for sharing the tip

but i have to ask ... are you really storing your credit card details in a civicrm field
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Hiding Profile from Event Confirmation Email

This forum was archived on 2017-11-26.