Hi again admin,
So i have:
$fields['images'] = array('type' => 'file', 'overwrite' => FALSE, 'display_overwrite' => FALSE, 'multiple' => TRUE);
Which does work as expected allowing me to upload multiple files one by one. However how can I have it so when I click "choose file" I am able to select multiple files at once? Is this possible?
Comments
input type="file[]" multiple
However looking at what fuelCMS generates for multiple files, (an input for each) I'm thinking this might not work.
So I'll add a second question:
How can I have a custom input within function form_fields() in a simple module?
<?php
function form_fields($values = array(), $related_fields = array())
{
$fields = parent::form_fields($values, $related_fields);
$CI =& get_instance();
$user_id = NULL;
if (!empty($values['id']))
{
$id = $values['id'];
}
$this->form_builder->load_custom_fields(APPPATH.'config/custom_fields.php');
$fields['content'] = array('type' => 'wysiwyg', 'editor' => 'wysiwyg');
$fields['images'] = array('type' => 'file', 'overwrite' => FALSE, 'display_overwrite' => FALSE, 'multiple' => TRUE);
//Custom HTML here somehow?
return $fields;
}
?>
Will i need to change to an advanced module?
So in general, you can create your own class or function, that returns an HTML string and store it in your fuel/application/libraries/ folder. Any additional javascript or CSS can be added to your assets directory and then mapped accordingly in your fuel/application/config/custom_fields.php file which is used for you application specific custom fields.
A little more can be read in the documentation here:
http://docs.getfuelcms.com/general/forms#association_parameters