Denali/Mt. McKinley and Brown Bear Software logo
Calcium Documentation - Custom Event Fields
Horizontal Line

The Custom Field option lets you define fields for events in your calendars. In multiple-calendar installations, each calendar can have its own set of custom fields.

For example, on a calendar used to keep track of customer meetings, you might want fields for Customer Number, Location, Phone Number, etc.

There are different types of fields, corresponding to the HTML input controls they use:

  • Single-line text entry
  • Multiple-line text entry
  • Single-selection pull-down menu
  • Multiple-selection pull-down menu
  • Check-box

Fields are defined using a simple form. In addition to specifying the type of data entry control, you can also supply labels to display, default values, entry choices (for pull-down menus), maximum sizes, and whether or not the field is required for new events.

By default, Fields are displayed using a simple list format, showing field label and value. But for full control, you can instead use Templates to control how your custom fields appear. Templates are available for the Event Entry Form, Event Popup windows, the 'Details' column in the List View, Event Mail Message, and RSS feeds.

Templates would usually use HTML for formatting. You can refer to the value of a custom field by prepending the name you choose for it with '$'; e.g. if your template for the Event Popup Window was set to display data in a simple table:

        <table border="1">
          <tr><td>Customer ID:</td>  <td>$cust_number</td></tr>
          <tr><td>Phone Number:</td> <td>$phone</td>      </tr>
The popup would display the template, showing the values of the 'cust_number' and 'phone' fields for that particular event, e.g. it would appear something like:
Customer ID: B-234
Phone Number: 123-456-7890

For the Event Entry Form template, the '$' notation causes the HTML form entry control for that field to be displayed. For example, a field defined as a pull-down menu would display the menu you've defined for that field, so the person entering the event can choose the value.

The "Custom Fields" and "Templates" options on a calendar's "Settings" menu let you set this all up.

You can find an example calendar using Custom Fields on the Calendar Demos page; look for 'Custom Fields' link.