Jump to content

Upload files


ATEC_dev

Recommended Posts

  • 1 year later...
Hello,

I am developing a module that among other functions I want to send me an email to the client that I selected and with the files they attach.

When I upload files through code:

$ Fields_form = array (

'Form' => array (

'Legend' => array (

'Title' => $ this-> l ('Email Receipt Form'). '=> Client Name:'. $ Name_customer. ' - Email: '. $ Email_customer.' - Client language: '. $ Name_lang,

'Icon' => 'icon-cogs'

),

'Input' => array (

Array (

'Type' => 'text',

'Label' => $ this-> l ('Email Client'),

'Name' => 'email',

'Search' => false,

'Orderby' => false,

'Align' => 'center',

),

Array (

'Type' => 'text',

'Label' => $ this-> l ('E-mail copy'),

'Name' => 'ACCOUNT_EMAIL',

'Search' => false,

'Orderby' => false,

'Align' => 'center',

'Desc' => $ this-> l ('Check if this is the email you want to send a copy of the email sent.')

),

Array (

'Type' => 'file',

'Label' => $ this-> l ('Attach documents'),

'Name' => 'FILE',

'Search' => false,

'Orderby' => false,

'Align' => 'center',

'Desc' => $ test,

(to be continued)

 

 It works flawlessly, but only sends one attachment at a time.

I wanted to now send more than one attachment through what I did in the following code:

$ Fields_form = array (

'Form' => array (

'Legend' => array (

'Title' => $ this-> l ('Email Receipt Form'). '=> Client Name:'. $ Name_customer. ' - Email: '. $ Email_customer.' - Client language: '. $ Name_lang,

'Icon' => 'icon-cogs'

),

'Input' => array (

Array (

'Type' => 'text',

'Label' => $ this-> l ('Email Client'),

'Name' => 'email',

'Search' => false,

'Orderby' => false,

'Align' => 'center',

),

Array (

'Type' => 'text',

'Label' => $ this-> l ('E-mail copy'),

'Name' => 'ACCOUNT_EMAIL',

'Search' => false,

'Orderby' => false,

'Align' => 'center',

'Desc' => $ this-> l ('Check if this is the email you want to send a copy of the email sent.')

),

Array (

'Type' => 'file',

'Label' => $ this-> l ('Attach documents'),

'Name' => 'FILE',

'Search' => false,

'Orderby' => false,

'Align' => 'center',

'Desc' => $ test,

'Ajax' => true,

'Multiple' => true,

),

(to be continued)

This code uploads multiple files but I can not get it to work.

I can not get the second image code to work.

Someone can help me"?

Thank you

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...