Drupal: File upload required?
问题 For some reason, my form breaks when I try to make a file upload required. Here is the code for it: $form_id = "upload_form"; $form[$form_id] = array ( '#type' => 'fieldset', '#description' => t('This is a utility to import nodes from a Comma Separated Value file. To begin, pick a node type, and upload a CSV.'), ); $form[$form_id]['type'] = array( '#title' => t('Enter node type'), '#type' => 'textfield', // '#autocomplete_path' => '', TODO: autocomplete for node types '#required' => TRUE, '