function image_resize_form

Form structure for the image resize form.

Note that this is not a complete form, it only contains the portion of the form for configuring the resize options. Therefore it does not not need to include metadata about the effect, nor a submit button.

Parameters

$data: The current configuration for this resize effect.

2 calls to image_resize_form()
image_crop_form in drupal/core/modules/image/image.admin.inc
Form structure for the image crop form.
image_scale_form in drupal/core/modules/image/image.admin.inc
Form structure for the image scale form.
1 string reference to 'image_resize_form'
image_image_effect_info in drupal/core/modules/image/image.effects.inc
Implements hook_image_effect_info().

File

drupal/core/modules/image/image.admin.inc, line 380
Administration pages for image settings.

Code

function image_resize_form($data) {
  $form['width'] = array(
    '#type' => 'number',
    '#title' => t('Width'),
    '#default_value' => isset($data['width']) ? $data['width'] : '',
    '#field_suffix' => ' ' . t('pixels'),
    '#required' => TRUE,
    '#min' => 1,
  );
  $form['height'] = array(
    '#type' => 'number',
    '#title' => t('Height'),
    '#default_value' => isset($data['height']) ? $data['height'] : '',
    '#field_suffix' => ' ' . t('pixels'),
    '#required' => TRUE,
    '#min' => 1,
  );
  return $form;
}