Errata on http://docs.joomla.org/File_form_field_type - Joomla! Forum - community, help and support


original document:

intro: todo

type (mandatory) must file.
name (mandatory) unique name of field.
label (mandatory) (translatable) descriptive title of field.
default (optional) (not translatable) default value, doesn't mean file.
description (optional) (translatable) text shown tooltip when user moves mouse on drop-down box.
size (optional) width of file box in characters.
accept (optional) tells browser mime types form allow uploaded.
class (optional) css class name html form field.
disabled (optional) html equivalent attribute
onchange (optional) html equivalent attribute
required (optional) joomla form validating filled in
validate (optional) whether joomla validate field according rules
onchange (optional) html equivalent attribute (javascript use)
note: should add attribute enctype="multi-part/form-data" form tag when using file input type. otherwise, uploaded files not attached correctly.
note 2: can put soft limit file size adding hidden field name="max_file_size" , value maximum allowed bytes handled php, must handle in code or without it. example xml field definition:

please note @ underlined , bold: enctype="multipart/form-data"
if followed code above using file field type, not carry file, $_files global array empty, trust me spent 6 hours on debugging own application typo error. have accounts on docs.joomla.org, please suggest change, helpful, don't have account on joomla wiki page... please, have, take time suggest correction.. thank you.






Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support