I haven’t been able to find a single example of how to create a webform with a managed_file type.
The webform initially had the type ‘file’, but needs to be changed to accept multiple attachments. When the type is changed to ‘managed_file’, the field for uploading attachments does not render.
Here is my code snippet for the attachment field:
7 => array( 'name' => t('Attachment'), 'form_key' => 'attachment', 'type' => 'managed_file', 'upload_location' => NULL, 'pid' => 1, 'weight' => 6, 'value' => '', 'required' => '0', 'extra' => array( 'directory' => 'story', 'title_display' => 'before', 'private' => 0, 'wrapper_classes' => '', 'css_classes' => '', 'filtering' => array( 'size' => '2 MB', 'types' => array( 'gif', 'jpg', 'jpeg', 'png', 'txt', 'rtf', 'html', 'pdf', 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'zip', ), 'addextensions' => '', ), 'rename' => '', 'scheme' => 'public', 'progress_indicator' => 'throbber', 'description' => '', 'attributes' => array(), 'analysis' => FALSE, ), ), );
Thanks much!
Sponsored by SupremePR