jQuery UI Widgets › Forums › Editors › FileUpload › Integrating in existing form
Tagged: File Upload, jqwidgets file upload
This topic contains 5 replies, has 3 voices, and was last updated by SkippingAdi 8 years, 6 months ago.
-
Author
-
Hi,
I looked at the new jqxFileUpload widget and generally I like it because it bugs me to have a form with several input fields all styled with jqxwidgets and in addition to those a plain looking input with type file field.
However, this widget as far as I understand it and have seen in the examples is meant for a single file upload – this is a scenario I rarely have to implement, mostly when I need to upload a file it is part of a form to attach additional information to a file like a comment or a connection to existing data in a database. Unfortunately there is no example for that case given, but I assume what one would have to do is generating a querystring on the uploadstart event and change the uploadUrl then. I don’t know if it would work that way and to be honest that wouldn’t be a solution I prefer.
So for me it comes down to this question: is it possible to use this widget to replace an existing file input field in an existing form, e.g. having a div with an id attribute and this is transformed into the design but without the form that is generated in the html in the examples? That of course would be a single file upload by design. And if this is not possible, would you consider making that option available in a future version, either by setting options in this widget or as a seperate widget?
Kind regards
KlausHi Klaus,
The widget is not meant for single file upload and I suggest you to look at the samples again. It allows you to browser for files more than once and upload more than 1 file at the same time. The widget can be created only from DIV tag. The fileInputName param defines the “name” attribute of the internal file upload and you can use that “name” on your server side.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHello Peter,
I did not question that. I understand what the widget is supposed to do. It takes a div, adds a button, a container, an iframe and a form with an file upload field. This is good when you need to upload a file, period. As I mentioned above this is seldom the case when I have to upload a file and store it on a server or in a database, for that I need additional data I have to send with the file. So it usually is a form with multiple input fields (jqxInput, jqxNumberInput, jqxDropDownList, …). So on the server side I have a script/servlet that expects the files and all the other parameters. I don’t see a way to achieve this with this widget because as far as I can tell this widget is meant for only the file to be submitted, hence the generated form.
For me it would be a huge benefit to have a form with multiple fields including a file upload field to use a theme setting and submit the form including the file upload and be able to validate it with jqxValidator – that would be perfect. And since you have a layout for the file upload now, my question in general is would it be possible with an additional widget to transform a div into the button, the container and the file upload field without adding a form into it (= only single file upload).
So in general it would only be a visual upgrade from the standard file upload field. From the look and feel of forms it would be a huge benefit.
Kind regards
KlausHi Klaus H,
For now, it’s possible to be used in the demonstrated way. If we decide to do something in addition in future versions, you’ll see it with future versions.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHello Peter,
thank you. 🙂
Kind Regards
KlausI would also give that a +1. Integrating this widget into an existing form and then be able to submit the selected file(s) together with the other form Input elements back to the Server would be great.
Regards
Adrian -
AuthorPosts
You must be logged in to reply to this topic.