AAAAacademiac/www/administrator/components/com_chronoforms/form_actions/upload_files/upload_files.ctp 0000604 00000015006 15137476506 0030715 0 ustar 00 home
Header(array('settings' => 'Settings', 'advanced' => 'Advanced', 'help' => 'Help'), 'upload_files_config_{n}'); ?>
tabStart('settings'); ?>
input('action_upload_files_{n}_enabled_config', array('type' => 'select', 'label' => 'Enabled', 'options' => array(0 => 'No', 1 => 'Yes'))); ?>
input('action_upload_files_{n}_files_config', array('type' => 'text', 'label' => "Fields Configuration", 'class' => 'big_input', 'value' => '', 'smalldesc' => 'Config string, e.g: field1:jpg-png-gif,field2:zip-rar,field3:doc-docx-pdf')); ?>
input('action_upload_files_{n}_upload_path_config', array('type' => 'text', 'label' => "Upload Path", 'class' => 'big_input', 'smalldesc' => 'The files upload path, if left empty, files will be uploaded under this path:
JOOMLA_PATH/components/com_chronoforms/uploads/FORM_NAME/
You can use "JOOMLA_PATH" in the path, it will be replaced by the website path in runtime.')); ?>
input('action_upload_files_{n}_max_size_config', array('type' => 'text', 'label' => "Max Size in KB", 'class' => 'medium_input', 'value' => '')); ?>
input('action_upload_files_{n}_min_size_config', array('type' => 'text', 'label' => "Min Size in KB", 'class' => 'medium_input', 'value' => '')); ?>
input('action_upload_files_{n}_max_error_config', array('type' => 'text', 'label' => "Max Size Error Message", 'class' => 'medium_input', 'value' => '')); ?>
input('action_upload_files_{n}_min_error_config', array('type' => 'text', 'label' => "Min Size Error Message", 'class' => 'medium_input', 'value' => '')); ?>
input('action_upload_files_{n}_type_error_config', array('type' => 'text', 'label' => "File type Error Message", 'class' => 'medium_input', 'value' => '')); ?>
input('action_upload_files_{n}_safe_file_name_config', array('type' => 'select', 'label' => 'Safe File name', 'options' => array(0 => 'No', 1 => 'Yes'), 'smalldesc' => 'This will remove any special characters from the file name.')); ?>
tabEnd(); ?>
tabStart('advanced'); ?>
input('action_upload_files_{n}_array_fields_config', array('type' => 'text', 'label' => "Array Fields", 'class' => 'medium_input', 'value' => '', 'smalldesc' => 'Fields names of type array []')); ?>
input('action_upload_files_{n}_zip_file_config', array('type' => 'select', 'label' => 'Compress file', 'options' => array(0 => 'No', 1 => 'Yes'), 'smalldesc' => 'Would you like to compress the uploaded file ? only .zip compression is supported and this option requires PHP 5.2 or later')); ?>
input('action_upload_files_{n}_zip_delete_file_config', array('type' => 'select', 'label' => 'Delete original', 'options' => array(0 => 'No', 1 => 'Yes'), 'smalldesc' => 'Delete original file after compression ?')); ?>
tabEnd(); ?>
tabStart('help'); ?>
- All configured fields share the same max and minimux size check, if you have different sizes then add another "Files upload" action.
- Files data will be stored after processing under the $form->files AND $form->data['_PLUGINS_']['upload_files'].
- You can add a "Custom code" action after this one and use this code to check/user the response data stored : print_r2($form->data['_PLUGINS_']['upload_files']);
tabEnd(); ?>