function image_field_widget_settings_form
Implements hook_field_widget_settings_form().
File
-
modules/
image/ image.field.inc, line 308
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.