function imageapi_optimize_pipeline_add_form in Image Optimize (or ImageAPI Optimize) 7.2
Form builder; Form for adding a new image pipeline.
See also
image_pipeline_add_form_submit()
1 string reference to 'imageapi_optimize_pipeline_add_form'
- imageapi_optimize_menu in ./
imageapi_optimize.module - Implements hook_menu().
File
- ./
imageapi_optimize.admin.inc, line 253
Code
function imageapi_optimize_pipeline_add_form($form, &$form_state) {
$form['label'] = array(
'#type' => 'textfield',
'#title' => t('Pipeline name'),
'#default_value' => '',
'#required' => TRUE,
);
$form['name'] = array(
'#type' => 'machine_name',
'#description' => t('Use only lowercase alphanumeric characters, underscores (_), and hyphens (-).'),
'#size' => '64',
'#required' => TRUE,
'#machine_name' => array(
'exists' => 'imageapi_optimize_pipeline_load',
'source' => array(
'label',
),
'replace_pattern' => '[^0-9a-z_\\-]',
'error' => t('Please only use lowercase alphanumeric characters, underscores (_), and hyphens (-) for pipeline names.'),
),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Create new pipeline'),
);
return $form;
}