Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
CiviCRM Cookbook

You're reading from   CiviCRM Cookbook Improve your CiviCRM capabilities with this clever cookbook. Packed with recipes and screenshots, it's the natural way to dig deeper into the software and achieve more for your nonprofit or civic sector organization.

Arrow left icon
Product type Paperback
Published in Jun 2013
Publisher Packt
ISBN-13 9781782160441
Length 236 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Toc

Table of Contents (13) Chapters Close

Preface 1. Setting Up CiviCRM FREE CHAPTER 2. Organizing Data Efficiently 3. Using the Power of Profiles 4. Controlling Permissions 5. Managing Communications 6. Searching and Reporting 7. Integrating CiviCRM with Drupal 8. Managing Events Effectively 9. Using Campaigns, Surveys, and Petitions Effectively 10. Working with CiviMember 11. Developing for CiviCRM 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.
    How to do it…
  2. Click on the Add Set of Custom Fields button.
    How to do it…

    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.
    How to do it…
  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.
    How to do it…

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

You have been reading a chapter from
CiviCRM Cookbook
Published in: Jun 2013
Publisher: Packt
ISBN-13: 9781782160441
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image