1 image.admin.inc image_resize_form($data)

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.

File

core/modules/image/image.admin.inc, line 465
Admin page callbacks for the Image module.

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,
    '#max' => 1000000000,
  );
  $form['height'] = array(
    '#type' => 'number',
    '#title' => t('Height'),
    '#default_value' => isset($data['height']) ? $data['height'] : '',
    '#field_suffix' => ' ' . t('pixels'),
    '#required' => TRUE,
    '#min' => 1,
    '#max' => 1000000000,
  );
  return $form;
}