function upload_qc_form in Upload QC 7
Form generator for module settings.
1 string reference to 'upload_qc_form'
- upload_qc_menu in ./
upload_qc.module - Implements hook_menu().
File
- ./
upload_qc.module, line 36
Code
function upload_qc_form($form, &$form_state) {
$form['upload_qc_error'] = array(
'#type' => 'checkbox',
'#title' => t('Check for PDO upload errors'),
'#default_value' => variable_get('upload_qc_error', 0),
'#description' => t("Check for PDO-related errors in MySQL db while uploading files."),
'#required' => FALSE,
);
$form['upload_qc_length'] = array(
'#type' => 'textfield',
'#title' => t('File name length'),
'#default_value' => variable_get('upload_qc_length', '225'),
'#size' => 50,
'#maxlength' => 50,
'#description' => t("Maximum file name length in characters allowed for file being uploaded. That includes extensions. If not checking, leave blank."),
'#required' => FALSE,
);
$form['upload_qc_include'] = array(
'#type' => 'textfield',
'#title' => t('Required words/characters'),
'#default_value' => variable_get('upload_qc_include', ''),
'#size' => 50,
'#maxlength' => 50,
'#description' => t("Required words/characters in the file name. If not checking, leave blank."),
'#required' => FALSE,
);
$form['upload_qc_exclude'] = array(
'#type' => 'textfield',
'#title' => t('Banned words/characters'),
'#default_value' => variable_get('upload_qc_exclude', ''),
'#size' => 50,
'#maxlength' => 50,
'#description' => t("Banned words/characters in the file name. If not checking, leave blank."),
'#required' => FALSE,
);
$form['upload_qc_size'] = array(
'#type' => 'textfield',
'#title' => t('File size'),
'#default_value' => variable_get('upload_qc_size', '1024'),
'#size' => 50,
'#maxlength' => 50,
'#description' => t("Maximum file size in KB allowed for file being uploaded. E.g. 1M file is 1024 KB. If not checking, leave blank."),
'#required' => FALSE,
);
$form = system_settings_form($form);
return $form;
}