function field_slideshow_form_alter in Field Slideshow 7
Same name and namespace in other branches
- 7.2 field_slideshow.module \field_slideshow_form_alter()
Implements hook_form_alter().
File
- ./
field_slideshow.module, line 484 - Implement a slideshow formatter for fields.
Code
function field_slideshow_form_alter(&$form, &$form_state, $form_id) {
// If Colorbox slideshow is needed, enable required variable
if ($form_id == 'field_ui_display_overview_form' && !empty($form_state['triggering_element'])) {
if (!empty($form_state['formatter_settings']) && isset($form_state['triggering_element']['#field_name'])) {
$field = $form_state['triggering_element']['#field_name'];
if (isset($form_state['formatter_settings'][$field]['slideshow_colorbox_slideshow']) && $form_state['formatter_settings'][$field]['slideshow_colorbox_slideshow'] != '') {
variable_set('colorbox_load', 1);
}
}
}
}