1 image.field.inc | image_field_widget_settings_form($field, $instance) |
Implements hook_field_widget_settings_form().
File
- core/
modules/ image/ image.field.inc, line 408 - 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['browser_view'] = array(
'#title' => t('Enable image browser'),
'#type' => 'checkbox',
'#return_value' => 'image_library',
'#default_value' => $settings['browser_view'],
'#description' => t('Enable the image browser as an alternative to the normal upload.'),
'#weight' => -3,
);
$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;
}