InputfieldFile class

One or more file uploads (sortable)

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the InputfieldFile class also inherits all the methods and properties of: Inputfield, WireData and Wire.

Show class?             Show args?        

Common

NameReturnSummary 
InputfieldFile::descriptionRows int Number of rows for description field (default=1, 0=disable) 
InputfieldFile::destinationPath string Destination path for uploaded file 
InputfieldFile::extensions string Allowed file extensions, space separated 
InputfieldFile::extractMetadata(Pagefile $pagefile)
array)
InputfieldFile::fileAdded(Pagefile $pagefile)
(nothing)
InputfieldFile::get($key)
mixed nullGet a property or attribute from the Inputfield 
InputfieldFile::getConfigInputfields()
InputfieldWrapperConfiguration settings for InputfieldFile
InputfieldFile::getDisplayBasename(Pagefile $pagefile)
stringGet a basename for the file, possibly shortened, suitable for display in InputfieldFileList 
InputfieldFile::getItemInputfields()
bool InputfieldWrapperGet custom Inputfields for editing given Pagefile 
InputfieldFile::getWireUpload()
WireUploadReturn the current WireUpload instance or create a new one if not yet created 
InputfieldFile::isEmpty()
boolPer Inputfield interface, returns true when this field is empty 
InputfieldFile::itemClass string Class name(s) for each file item (default=InputfieldFileItem ui-widget ui-widget-content) 
InputfieldFile::maxFiles int Maximum number of files allowed 
InputfieldFile::maxFilesize int Maximum file size 
InputfieldFile::noAjax bool int Set to true or 1 to disable ajax uploading 
InputfieldFile::noCollapseItem bool int Set to true to disable collapsed items (like for LanguageTranslator tool or other things that add tools to files) 
InputfieldFile::noCustomButton bool int Set to true to disable use of the styled <input type='file'> 
InputfieldFile::noLang bool int Set to true or 1 to disable multi-language descriptions 
InputfieldFile::noShortName bool int Set to true to disable shortened filenames in output 
InputfieldFile::noUpload bool int Set to true or 1 to disable uploading to this field 
InputfieldFile::okExtensions array File extensions that are whitelisted if any in $extensions are problematic. (3.0.167+) 
InputfieldFile::overwrite bool int Whether or not overwrite mode is enabled 
InputfieldFile::processInput(WireInputData $input)
selfProcess input
InputfieldFile::processInputAddFile($filename)
Pagefile null
InputfieldFile::processInputDeleteFile(Pagefile $pagefile)
(nothing)
InputfieldFile::processInputFile(WireInputData $input, Pagefile $pagefile, $n)
bool
InputfieldFile::processItemInputfields(Pagefile $pagefile, InputfieldWrapper $inputfields, $id, WireInputData $input)
bool
InputfieldFile::render()
stringRender Inputfield input
InputfieldFile::renderItem($pagefile, $id, $n)
string
InputfieldFile::renderList($value)
string
InputfieldFile::renderReady()
boolRender ready 
InputfieldFile::renderUpload($value)
string
InputfieldFile::renderValue()
stringRender Inputfield value
InputfieldFile::set($key, $value)
Inputfield WireDataSet a property or attribute to the Inputfield 
InputfieldFile::setAttribute($key, $value)
Inputfield InputfieldFileSet an attribute 
InputfieldFile::setMaxFilesize($filesize)
$thisSet the max file size in bytes or use string like "30m", "2g" "500k" 
InputfieldFile::setParent(InputfieldWrapper $parent)
$thisSet the parent of this Inputfield 
InputfieldFile::tagsList string Predefined tags 
InputfieldFile::unzip bool int Whether or not unzip is enabled 
InputfieldFile::uploadOnlyMode int Set to true or 1 to disable existing file list display, or 2 to also prevent file from having 'temp' status. 
InputfieldFile::useTags bool Whether or not tags are enabled 
InputfieldFile::value Pagefiles Pagefile null 

Additional methods and properties

In addition to the methods and properties above, InputfieldFile also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.236

Latest news

  • ProcessWire Weekly #518
    The 518th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
    Weekly.pw / 13 April 2024
  • ProFields Table Field with Actions support
    This week we have some updates for the ProFields table field (FieldtypeTable). These updates are primarily focused on adding new tools for the editor to facilitate input and management of content in a table field.
    Blog / 12 April 2024
  • Subscribe to weekly ProcessWire news

“Yesterday I sent the client a short documentation for their ProcessWire-powered website. Today all features already used with no questions. #cmsdoneright—Marc Hinse, Web designer/developer