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');
var fmNewDocument = cellUpload.attachForm();
The XML looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<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" />
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.
works fine localy. please provide completed demo or direct link? (you can also send detailt to firstname.lastname@example.org, please include link to this thread if any)
Here is the direct link to the app:
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.
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
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?
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,
this mean that
“Engine successfuly inited, Flash Player: 11.5.502”
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