File form field type/de

From Joomla! Documentation

This page is a translated version of the page File form field type and the translation is 57% complete.
Outdated translations are marked like this.
Other languages:
Deutsch • ‎English • ‎Nederlands • ‎español • ‎français

Bietet ein Eingabefeld für Dateien.

  • type (notwendig) muss Datei sein.
  • name (notwenig) ist der eindeutige Name des Feldes.
  • label (notwendig) (übersetzbar) ist der beschreibende Titel des Feldes.
  • Beschreibung (optional) (übersetzbar) ist der Text, der als Tooltip als Mouse-over Effekt über die Dropdown-Box angezeigt wird.

default(optional) (nicht übersetzbar) ist der Standardwert, aber von minimaler Bedeutung für eine Datei. size (optional) ist die Breite der Box.

accept (optional) sagt dem Brwser, welche Mime-Typen das Formular hochladen kann.

class (optional) ist der CSS Klassenname für das HTML Formularfeld. labelclass (optional) fügt eine CSS Klasse für das Formularfeld Label hinzu, ab Joomla 2.5.4

  • disabled (optional) HTML equivalent attribute
  • onchange (optional) HTML equivalent attribute (javascript use)
  • required Cannot be used with this field type. If the field is marked as required it will always fail validation regardless of whether a file has been uploaded or not. The suggested workaround is to add a filerequired attribute which can be tested in your own file handling code.
  • validate (optional) Whether to Joomla validate the field according to rules

showon (optional) Erlaubt, ein Feld, das auf den Werten eines anderen Feldes basiert auszublenden, seit Joomla 3.2.4

  • multiple (optional) macht es möglich, mehrere Dateien auf einmal hochzuladen, wenn die Einstellung auf multiple="true" steht.

Note: When using the file input type you should always add the attribute enctype="multipart/form-data" to your form tag. Otherwise, the uploaded files will not be attached correctly. Note 2: You can put a soft limit file size by adding a hidden field with name="MAX_FILE_SIZE" and value the maximum allowed bytes which is handled by php, but you must also handle it in your code with or without it.

Beispiel XML-Felddefinitionen:

<field name="myfilevalue" type="file" label="Enter some text" description="Choose an image from your computer with maximum 100KB" size="10" accept="image/*" />

Siehe auch