Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 2.2.0
-
Fix Version/s: 2.2.0
-
Component/s: Core CiviCRM
-
Labels:None
Description
If for example a profile is being used to allow users to signup for your many email newsletters you are going to want a description next to the name for each newsletter. I had to do this in a really hack way:
function oa_custom_civicrm_buildForm($form_id, &$form) {
switch ($form_id) {
case 'CRM_Profile_Form_Dynamic':
foreach($form->_elements as &$element) {
// Add the group descriptions to the newletter form elements.
if ($element->_name == 'group') {
db_set_active('civicrm');
foreach($element->_elements as &$option) {
if ($description = db_result(db_query('SELECT description FROM civicrm_group WHERE id = %d', $option->_attributes['name'])))
}
db_set_active();
}
}
break;
}
}