-
Book Overview & Buying
-
Table Of Contents
CiviCRM Cookbook
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.
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:
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.
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.


In this recipe, call the custom data set Phone call options, or substitute your own label.
Phone Call activity is created, the fields will appear on the activity form for the user to complete.
Phone Call activity. The custom field is available.
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.
Change the font size
Change margin width
Change background colour