function addtocalendar_field_widget_form in Add To Calendar Button (AddEvent.com) 7.2
Implements hook_field_widget_form().
File
- ./
addtocalendar.module, line 149 - Contains module code.
Code
function addtocalendar_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
if ($field['cardinality'] == 1) {
$element['#type'] = 'fieldset';
}
$element['display_addtocalendar'] = array(
'#title' => t('Show add to calendar widget'),
'#type' => 'checkbox',
'#default_value' => isset($items[$delta]['display_addtocalendar']) ? $items[$delta]['display_addtocalendar'] : '',
);
return $element;
}