image_style_add_form

7 image.admin.inc image_style_add_form($form, &$form_state)
8 image.admin.inc image_style_add_form($form, &$form_state)

Form builder; Form for adding a new image style.

See also

image_style_add_form_submit()

image_style_name_validate()

Related topics

1 string reference to 'image_style_add_form'

File

modules/image/image.admin.inc, line 241
Administration pages for image settings.

Code

function image_style_add_form($form, &$form_state) {
  $form['name'] = array(
    '#type' => 'textfield', 
    '#size' => '64', 
    '#title' => t('Style name'), 
    '#default_value' => '', 
    '#description' => t('The name is used in URLs for generated images. Use only lowercase alphanumeric characters, underscores (_), and hyphens (-).'), 
    '#element_validate' => array('image_style_name_validate'), 
    '#required' => TRUE,
  );

  $form['submit'] = array(
    '#type' => 'submit', 
    '#value' => t('Create new style'),
  );

  return $form;
}
Login or register to post comments