theme_file

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 theme_file($element)

Format a file upload field.

Übergabeparameter

$title The label for the file upload field.

$name The internal name used to refer to the field.

$size A measure of the visible size of the field (passed directly to HTML).

$description Explanatory text to display after the form item.

$required Whether the user must upload a file to the field.

Rückgabewert

A themed HTML string representing the field.

For assistance with handling the uploaded file correctly, see the API provided by file.inc.

Verwandte Themen

Code

includes/form.inc, line 2186

<?php
function theme_file($element) {
  _form_set_class($element, array('form-file'));
  return theme('form_element', $element, '<input type="file" name="' . $element['#name'] . '"' . ($element['#attributes'] ? ' ' . drupal_attributes($element['#attributes']) : '') . ' id="' . $element['#id'] . '" size="' . $element['#size'] . "\" />\n");
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen