This documentation refers to an older version of CiviCRM (3.4 / 4.0). The current stable version is 4.1. Please introduce all documentation changes and new material here.

Skip to end of metadata
Go to start of metadata
This page refers to CiviCRM 3.4 and 4.0, current STABLE version.

Documentation Search


CiviCRM 3.4 and 4.0 Documentation

Support and Participation

Developer Resources


CiviCRM books!

Make sure to check out the FLOSS Manual Understanding CiviCRM as well! You can also support this project by ordering a hard copy.

Or support us by buying an eBook or hard copy of Using CiviCRM from Packt Publishing.

Remove 'Do not trade' from Privacy options

When adding or editing an Individual, the 'Do not trade' checkbox within the Privacy section can be confusing to the user.

The checkbox is intended to be used by organisations who want to swap mailing list info, and provides a way of marking a contact as not being included in the lists that they swap. It was added at the request of a few organisations.

However, if your organisation doesn't plan to do any such swapping, you may want to remove the field to avoid confusion and to generally reduce page clutter.

To remove the option, edit CRM/Core/SelectValues.php, function privacy() , remove:

 " 'do_not_trade' => ts('Do not trade') "

(This removes the label)

To remove the checkbox, edit civicrm/CRM/Contact/Form/Edit.php, in buildCommunicationBlock(), remove:

 $privacy[] = HTML_QuickForm::createElement('advcheckbox', 'do_not_trade', null, $t['do_not_trade']);

The checkbox removal code above appears to be slightly outdated for versions after 3.2.  The Edit.php file is now an Edit directory. 

These files are part of CiviCRM core, so when you upgrade versions your changes may be lost.

Labels
  • None