On this page
function image_field_widget_settings_form
image_field_widget_settings_form($field, $instance)
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;
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!image!image.field.inc/function/image_field_widget_settings_form/7.x