inputFile example

This example introduces intelligent file inputs. Besides the file input itself you can also use this element type to display a file thumbnail, a link to a file or even a "remove file" button - all these help a lot when you're building a form to modify such data.

The live form - submit it!

inputfile.png
inputfile.png

Data dump

Below are the dumps of some PHP variables - submit the form to see the changes!

Contents of the $_POST array:
$_POST = array (
)

Results of a $clonefish->getElementValues() call:
array (
  'inputfile1' => NULL,
  'inputfile2' => NULL,
  'inputfile3' => NULL,
)

There are cases when the above arrays are different. This is not a bug, but a feature: clonefish was written to help with everyday form hassles (like avoiding the missing value of an unchecked checkbox or compiling the whole date string from date selector fields).