FileUpload
FileUpload
TextField
- Full name: \Gibbon\Forms\Input\FileUpload
- Parent class: \Gibbon\Forms\Input\Input
Methods
- accepts — Set an array or CSV string of file extensions accepted by this file input.
- setAttachment — Set the attachment name and path.
- setAttachments — Set the attachment name and path.
- setDeleteAction — Set the URL to visit if the delete action is clicked.
- setMaxUpload — Set the hidden input MAX_FILE_SIZE in MB and displays the amount (false to disable max upload).
- canDelete — Sets whether the attachment will have a delete option.
- uploadMultiple — Sets whether the input accepts multiple files.
Inherited from Element
Inherited from Input
- setRow
- addValidationOption
- addValidation
- isValidatable
- hasValidation
- getValidationAsJSON
- getValidationOutput
Inherited from InputAttributesTrait
- setName
- getName
- setValue
- getValue
- loadFrom
- loadFromCSV
- setSize
- getSize
- isDisabled
- setDisabled
- getDisabled
- isRequired
- setRequired
- getRequired
- readonly
- setReadonly
- getReadonly
- setTabIndex
- getTabIndex
Inherited from Element
Inherited from BasicAttributesTrait
- setID
- getID
- setTitle
- getTitle
- setClass
- addClass
- removeClass
- getClass
- addData
- getData
- getAttributeString
accepts
Set an array or CSV string of file extensions accepted by this file input.
FileUpload::accepts( array|string $accepts ): self
Returns Self: This method can be chained.
setAttachment
Set the attachment name and path.
FileUpload::setAttachment( string $name, string $absoluteURL, string $filePath = '' )
setAttachments
Set the attachment name and path.
FileUpload::setAttachments( string $absoluteURL, $attachments )
setDeleteAction
Set the URL to visit if the delete action is clicked.
FileUpload::setDeleteAction( string $actionURL )
setMaxUpload
Set the hidden input MAX_FILE_SIZE in MB and displays the amount (false to disable max upload).
FileUpload::setMaxUpload( string $value ): self
Returns Self: This method can be chained.
canDelete
Sets whether the attachment will have a delete option.
FileUpload::canDelete( boolean $value ): self
Returns Self: This method can be chained.
uploadMultiple
Sets whether the input accepts multiple files.
FileUpload::uploadMultiple( boolean $value = true ): self
Returns Self: This method can be chained.