function allow_all_file_extensions_form_field_ui_field_edit_form_alter in Allow All File Extensions 7
Implements hook_form_FORM_ID_alter().
File
- ./
allow_all_file_extensions.module, line 6
Code
function allow_all_file_extensions_form_field_ui_field_edit_form_alter(&$form, &$form_state, $form_id) {
if ($form['#field']['type'] === 'file') {
$form['instance']['settings']['file_extensions']['#type'] = 'textarea';
$form['instance']['settings']['file_extensions']['#description'] = t('Separate extensions with a space or comma and do not include the leading dot. Leave this blank to allow all file types <strong>(security warning: only trusted users should be able to upload files of arbitrary type)</strong>.');
$form['instance']['settings']['file_extensions']['#maxlength'] = 2048;
$form['instance']['settings']['file_extensions']['#required'] = FALSE;
}
}