Skip to main content

CiviCRM custom data storage

  • strict warning: Non-static method view::load() should not be called statically in /var/www/vhosts/litzastark.com/sites/all/modules/views/views.module on line 906.
  • strict warning: Declaration of views_handler_argument::init() should be compatible with views_handler::init(&$view, $options) in /var/www/vhosts/litzastark.com/sites/all/modules/views/handlers/views_handler_argument.inc on line 744.
  • strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /var/www/vhosts/litzastark.com/sites/all/modules/views/handlers/views_handler_filter.inc on line 607.
  • strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /var/www/vhosts/litzastark.com/sites/all/modules/views/handlers/views_handler_filter.inc on line 607.
  • strict warning: Declaration of views_handler_filter_boolean_operator::value_validate() should be compatible with views_handler_filter::value_validate($form, &$form_state) in /var/www/vhosts/litzastark.com/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc on line 159.
  • strict warning: Non-static method view::load() should not be called statically in /var/www/vhosts/litzastark.com/sites/all/modules/views/views.module on line 906.
  • strict warning: Declaration of views_handler_filter_node_status::operator_form() should be compatible with views_handler_filter::operator_form(&$form, &$form_state) in /var/www/vhosts/litzastark.com/sites/all/modules/views/modules/node/views_handler_filter_node_status.inc on line 13.
  • strict warning: Declaration of views_plugin_style_default::options() should be compatible with views_object::options() in /var/www/vhosts/litzastark.com/sites/all/modules/views/plugins/views_plugin_style_default.inc on line 24.
  • strict warning: Declaration of views_plugin_row::options_validate() should be compatible with views_plugin::options_validate(&$form, &$form_state) in /var/www/vhosts/litzastark.com/sites/all/modules/views/plugins/views_plugin_row.inc on line 134.
  • strict warning: Declaration of views_plugin_row::options_submit() should be compatible with views_plugin::options_submit(&$form, &$form_state) in /var/www/vhosts/litzastark.com/sites/all/modules/views/plugins/views_plugin_row.inc on line 134.

I'm thinking about customizing CiviCRM such that custom data can be linked to Personal Campaign Pages. Here are some notes on how the database is set up:

Upon creating a new Custom Data Group, a new table is created called civicrm_value_[group_name]_[group_id] in which the data for this new group will be stored. Columns in this table are id, entity_id (i.e., the id of the user if this data is to be linked to a user), and custom columns for each of the new custom data fields in this group. A new record is also created in the civicrm_custom_group table.

I imagine that it should be possible to extend the Personal Campaign Pages system such that they can be extended using a custom data group, and the fields in this group are presented when creating or editing a new PCP. I think that this would be the best way to handle this.

ALTERNATELY, since events can already have new custom data groups associated with them, it may be that we want to link all PCP's with events and store this custom data on the event record rather than the PCP record. Whether we do this depends on whether it's practical to associate all PCP's with events, or just the ones that will actually have dates associated with them. A start date is required, though an end date is optional; these could easily be used as the dates when the page should be live (or even just be defaulted to the current date/time).