uploader via xml

Hi,

can I have an example on how to add an uploader to a dhtmlxForm via XML?
At this moment I’m doing something like this:

[code] var layoutDocument = cellRight.attachLayout(‘2E’);

// Form for new alert
var cellUpload = layoutDocument.cells('a');
cellUpload.setText('Aggiungi nuovo documento');
cellUpload.setHeight(200);
var fmNewDocument = cellUpload.attachForm();
fmNewDocument.loadStruct("xml/formUploadDocument.xml");

[/code]

The XML looks like this:

<?xml version="1.0" encoding="UTF-8"?> <items> <item type="input" name="docDescription" label="Descrizione" inputWidth="330" inputHeight="45" position="label-top"/> <item type="select" name="docType" label="Tipo documenti" position="label-top" inputWidth="330" inputHeight="25"/> <item type="button" name="uplosd" value="Upload" inputWidth="330" inputHeight="25"/> <item type="newcolumn" /> <item type="fieldset" name="fmNewDocumentUploader" label="Uploader" inputWidth="auto"> <item type="upload" name="myFile" inputWidth="330" url="../../php/dhtmlxform_item_upload.php" _swfLogs="enabled" swfPath="dhtmlx/ext/uploader.swf" swfUrl="../../php/dhtmlxform_item_upload.php" /> </item> </items>

Into the index.php (where I’m trying to add the uploader) I’m including also the:

php folder is at the same level of the “dhtmlx” and “xml” ones.

Hi

works fine localy. please provide completed demo or direct link? (you can also send detailt to support@dhtmlx.com, please include link to this thread if any)

Here is the direct link to the app:
samuelnet.com/altrisiti/baango/

As soon as you’ll open it you’ll get an error…that’s the db connection as it’s not yet updated for the demo environment. But it’s not important for the goal of this post.

To see the problem you’ve to go to “Documenti” area, selecting the proper icon on the left data view. On the top will appear a form where I need to add the uploader, but it’s fieldset it’s empty.

Thanks!
Samuel

you need dhtmlxform_item_upload.js file
natively it located in dhtmlXForm/codebase/ext/ but it absend in dhtmlx.js - probably you’re using custom edition or old version. check if you dhtmlx.zip contain corresponding file, if not - please open ticket in our support system

Hi,
I had to include the js you suggest me and to change the xml for loading the for like this:

		<item type="upload" name="myFile" inputWidth="330" url="php/dhtmlxform_item_upload.php" _swfLogs="enabled"
			swfPath="dhtmlx/ext/uploader.swf" swfUrl="php/dhtmlxform_item_upload.php" />

now it works, even if it doesn’t look like the examples on your site: with that nice arrow while telling about the drag and drop feature, and also about the “select file area”. Why?

Where the file will be uploaded?

Thanks

Well, please read our documentation, it have answers I believe
docs.dhtmlx.com/doku.php?id=dhtm … orm_upload

Thanks, for the link.
I played a little with mode types.
The html* once work fine, as described there, but the flash one present the text:
"Engine successfuly inited
Flash Player: 11.5.502
"

what does this mean?
tested with firefox, safari, and chrome.

Thanks in advance,
Samuel

this mean that

“Engine successfuly inited, Flash Player: 11.5.502” :slight_smile:

for now we have 3 modes, html5, html4 and flash
each mode shows a bit different text, html5 says about drag-n-drop, html4 says only inited and flash shows version. depending on browser - mode selected autimaticaly (each mode have own advantages). what problem with flash do you have?

That the flash mode does not appear like the sample, that’s all.

check your config according documentation. sample works? check path to swf and other
if this will not help - please provide link to page with issue