Docs > Forms > RruFileInput
RruFileInput
Example
Click “Open Sandbox” to see the example source code
Props
Name | Description | Required |
---|---|---|
name | Unique form element name | Yes |
label | The form element label | No |
chooseFileLabel | The label that tells the user to select a file to upload. This label will be replaced by the file name after the user selects one. | No |
requiredAsterisk | Display an asterisk to indicate the field is required | No |
disabled | Controls whether the input field is disabled or not | No |
accept | Comma-separated list of one or more file types, or unique file type specifiers, describing which file types to allow. More info at MDN Web Docs | No |
onChange | A callback function. This is useful if you need to watch the field value | No |
Default field value
If you read the value of a field of this type, and the field did not have an initial value nor it was filled/entered by the user; then the default value is null
.