function royalslider_field_formatter_settings_form in RoyalSlider Integration 7
Implements hook_field_formatter_settings_form().
File
- ./
royalslider.module, line 794 - RoyalSlider module.
Code
function royalslider_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
$display = $instance['display'][$view_mode];
$settings = $display['settings'];
$element = array();
switch ($display['type']) {
case 'royalslider':
$element['optionset'] = array(
'#title' => t('Option Set'),
'#description' => t('All RoyalSlider settings are stored in Option Sets.'),
'#type' => 'select',
'#options' => _royalslider_optionsets(),
'#default_value' => $settings['optionset'],
);
$element['skin'] = array(
'#title' => t('Skin'),
'#description' => t('Override the Option Set\'s skin.'),
'#type' => 'select',
'#options' => _royalslider_skins(),
'#default_value' => $settings['skin'],
);
$element['max'] = array(
'#title' => t('Max Images'),
'#description' => t('Limit the number of images displayed.'),
'#type' => 'textfield',
'#size' => 3,
'#default_value' => $settings['max'],
);
break;
}
return $element;
}