function image_field_widget_settings_form in Drupal 7
Implements hook_field_widget_settings_form().
File
- modules/
image/ image.field.inc, line 304 - Implement an image field, based on the file module's file field.
Code
function image_field_widget_settings_form($field, $instance) {
$widget = $instance['widget'];
$settings = $widget['settings'];
// Use the file widget settings form.
$form = file_field_widget_settings_form($field, $instance);
$form['preview_image_style'] = array(
'#title' => t('Preview image style'),
'#type' => 'select',
'#options' => image_style_options(FALSE, PASS_THROUGH),
'#empty_option' => '<' . t('no preview') . '>',
'#default_value' => $settings['preview_image_style'],
'#description' => t('The preview image will be shown while editing the content.'),
'#weight' => 15,
);
return $form;
}