Champ File
Envoyer des fichiers, comme des fichiers de configuration ou des certificats
Propriétés
Les propriétés disponibles pour un champ file, regroupées par usage :
| Attribut | Commentaires |
|---|---|
| basic | |
| name string / obligatoire / unique | Field name
This attribute represents the name of the form field. |
| type string / obligatoire | Field type
Other attributes might only be available for some field types. Valeur : file |
| label string | Field label
A friendly name/label for the field. Note: if not set, the field name is used as label, but not when type is html. Since 6.0.3: Supports placeholders for dynamic labels (e.g., |
| placeholder string | In-field help value
Some form fields allow an in-field hint value. Since 6.0.3: Supports placeholders for dynamic hints (e.g., |
| help string | Field help message
Some fields require additional help information. This help message will be shown below the field. Since 6.0.3: Supports placeholders for dynamic help text (e.g., |
| data | |
| interaction | |
| dependencyFn string ajouté dans la version 4.0.0 | The dependency logical function
This attribute represents the logical function between multiple dependencies. Choix :
|
| dependencies list / elements=object | Show/hide this field based on the values or other fields
Each dependency element is either an object with the following 2 attributes:
Or with the following 2 attributes:
Use in combination with attribute |
| output | |
| output boolean ajouté dans la version 6.2.0 | Include field value as extravar
Form fields are by default sent as extravars. Par défaut : true |
| model string or array | Extravar modelling
By default, a field is sent as a root-extravar. |
| security | |
| noLog boolean ajouté dans la version 2.2.3 | Disable backend logging
Disables logging in the backend, to hide passwords for example. Par défaut : false |
| validation | |
| required boolean | Required field
Makes the field required. Par défaut : false |
| minSize number | File minimum size
Forces a file-fields size to not be lower than… Since 6.0.3: Supports placeholders for dynamic validation (e.g., |
| maxSize number | File maximum size
Forces a file-fields size to not be higher than… Since 6.0.3: Supports placeholders for dynamic validation (e.g., |
| accept array | File types the picker offers
The file types the file picker offers, as extensions ( |
| regex object | A regular expression validation
Enforces a validation where the current field must match a regular expression. This field requires an object with 2 attributes:
|
| ignoreIncomplete boolean | Allow form submit on non-evaluated placeholders
When an expression-based field has placeholders, Par défaut : false |
| visualization | |
| icon string | Field icon
Some formfields can hold a nice looking icon. The icon name is a free fontawesome 6 icon. You can find more information at www.fontawesome.com |
| group string | The field group name
With this attribute you can group fields together. |
| line string ajouté dans la version 4.0.3 | The field line name
With this attribute you can group fields in a single line together. |
| width string ajouté dans la version 4.0.3 | The field width
With this attribute you can set the width of a field. Choix :
|
Exemples
Exemples de champs file, en YAML :
Software Image Upload
La définition du champ, en YAML :
- type: file
name: software_image
label: Upload software image