Book Image

CiviCRM Cookbook

Book Image

CiviCRM Cookbook

Overview of this book

CiviCRM is a web-based, open source, Constituent Relationship Management (CRM) software geared toward meeting the needs of non-profit and other civic-sector organizations.Organizations realize their mission via CiviCRM through contact management, fundraising, event management, member management, mass e-mail marketing, peer-to-peer campaigns, case management, and much more.CiviCRM is localized in over 20 languages including: Chinese (Taiwan, China), Dutch, English (Australia, Canada, U.S., UK), French (France, Canada), German, Italian, Japanese, Russian, and Swedish.CiviCRM Cookbook will enhance your CiviCRM skills. It has recipes to help you use CiviCRM more efficiently, integrate it with CMSs, and also develop CiviCRM.This book begins with recipes that help save time and effort with CiviCRM. This is followed by recipes for organizing data more efficiently and managing profiles.Then you will learn authentication and authorization and managing communication with contacts.Then you will be guided on using the searching feature and preparing reports. We will then talk about integrating Drupal and CiviCRM. You will also be taught to manage events effectively. Finally, learn about CiviCampaign, Civimember, and developing CiviCRM.
Table of Contents (19 chapters)
CiviCRM Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding custom fields


Custom fields are a great way of storing and organizing data in CiviCRM. Custom fields are contained in custom datasets, and you apply each set to an object in CiviCRM, such as a contact type, an activity, or an event. For example, if you were organizing soccer teams, you might want to have a custom fieldset called Soccer Data that contains custom fields for playing position, goals scored, games played, and so on. Custom fields are searchable using advanced search.

Getting ready…

Custom fields need a bit of planning because once you have created a custom fieldset and applied it to an object, you cannot re-edit it and apply it to a different object. For example, let's say you are organizing a boat race. You want to collect information on boat size and boat type. You could choose to collect this custom information for each individual who applies to race, or for each actual participant in the race, or for each team in the race. So if you applied it to an individual contact and then changed your mind and only wanted to collect it for each participant, you would have to recreate the whole custom set of fields.

So you need to think about the following questions:

  • What sort of unique data do you want to collect?

  • What object do you want to apply the custom data set to?

In this example, we will add a simple custom field to the Phone Call activity. So when a phone call activity is recorded with a contact, the custom field will record if the call was general, a membership enquiry, or an event enquiry.

How to do it…

First we will create a custom data set, and then we will add some custom fields to it. In this recipe, we will add some fields to get data about phone calls.

  1. Navigate to Administer | Customize Data and Screens | Custom Fields. You will see a screen that contains the current listing of custom datasets.

  2. Click on the Add Set of Custom Fields button.

    In this recipe, call the custom data set Phone call options, or substitute your own label.

  3. In the Used For field, choose Activities and then choose Phone Call. This means that when a Phone Call activity is created, the fields will appear on the activity form for the user to complete.

  4. The Collapse this set on initial display checkbox is checked by default. This means that when you look at the contact record, the custom fields will be hidden until you click on the custom fieldset title. Uncheck it.

  5. Save the new custom fieldset and add custom fields.

  6. Add a set of three options to record the nature of the phone call. It is beyond the scope of this book to go into the details of the various field types available.

  7. Save the custom fields.

  8. Navigate to a contact and add the Phone Call activity. The custom field is available.

There's more…

If you add custom fieldsets to contacts, you will get more options. You can add a fieldset multiple times to the same record. This is useful for recording employment histories or academic achievements.

You can create a custom fieldset for cases, relationships, groups, events, and memberships.

See also