function file_style_add_form in Styles 7
Same name and namespace in other branches
- 7.2 contrib/file_styles/file_styles.admin.inc \file_style_add_form()
Form builder; Form for adding a new file style.
See also
1 string reference to 'file_style_add_form'
- xfile_styles_menu in contrib/
file_styles/ file_styles.module - Implement hook_menu().
File
- contrib/
file_styles/ file_styles.admin.inc, line 32 - Administrative page callbacks for the File: Styles module.
Code
function file_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 file. Use only lowercase alphanumeric characters, underscores (_), and hyphens (-).'),
'#element_validate' => array(
'file_style_name_validate',
),
'#required' => TRUE,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Create new style'),
);
return $form;
}