upload one file

hi all,

Please help, how do I upload a file before control form img file? My code in JS file:

formSendAvatar = popSendAvatar.attachForm([
    {type: "template", name: "form_template_imgAvatar", value: "<img src='images/user-100.png'>"},
    {type: "file", name: "form_file_avatar", label: "File input", labelWidth: 100},
    {type: "button", name: "form_button_send", value: "Button", width: "100", inputLeft: 100}

I was reading help on : docs.dhtmlx.com/form__controls_list.html#file

I do not know how to add real html form to JS file for send file.

DHTMLX is a great tool! excellent work. thank you very much!

thank you very much for the advice



by the default {type: “file”} can upload only one file, but you need a real-form-wrapper around dhtmlx form to upload files (i.e.

and submit real form when dhxform’s button is clicked or like this)

also you can try {type: “upload”, multiple: false} (it more modern)

also we have separate controll called dhtmlxVault

thank you very much for the advice.

{type: “upload” multiple: false} is exactly what I needed