Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

File upload - multiple files

More
7 years 5 months ago #3700 by idemsisvoje
File upload - multiple files was created by idemsisvoje
Hi, I am struggling with the file upload field. Is it possible to upload multiple files or just a single file?

Thanks.

More
7 years 5 months ago #3701 by Administrator AV
Replied by Administrator AV on topic File upload - multiple files
Hi,

you can create more than one field of type file upload in your form but with each file upload field you can only upload on file.

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
1 year 1 month ago #9080 by mojweb
Replied by mojweb on topic File upload - multiple files
Is there any change on that?
It would be realy great to have multiple upload options.
In most cases the number of needed upload files is not known. If I set 3 fields, some user may need 4.

More
1 year 1 month ago #9091 by Administrator IV
Replied by Administrator IV on topic File upload - multiple files
Hello mojweb,

unfortunately there is nothing new to report on the subject.

Visforms is not just about uploading files to save them somewhere in the backend.
The files have to be handled and edited in many places in the code (e-mail attachments, data views, data editing, form export, ...).

Where which files are located must be stored in a suitable manner in the database (form configuration: upload directory).
So far, the whole thing has been implemented field-based and an extension to any number of files is not trivial.

In addition, 'input' HTML elements must be created and filled dynamically.
In the backend, these previously unknown and unexpected inputs must be received accordingly.
This is also insecure against malicious manipulation.

All in all, a not really motivating idea and a rather considerable effort.
On the other hand, field-based works beautifully.

Workaround:
The following would be conceivable and easier to implement:
- you create a reasonable maximum amount of upload fields (10, 15, 20)
- you write some custom JavaScript

The custom JavaScript does something like this:
- it initially hides all other upload fields except for 1 field
- it always shows 1 more empty upload fields
- it always does this when there is no other empty upload field left

I personally don't know of any website where I can upload any number of files.

Kind regards, Ingmar

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
1 year 3 weeks ago #9111 by MaliRaj
Replied by MaliRaj on topic File upload - multiple files
Hallo Ingmar,
ich hänge mich mal hier rein, da mir dein Lösungsansatz sehr gut gefällt. Gleiche Anforderung löse ich bisher mit der vorherigen Abfrage der Anzahl hochzuladener Dateien und der entsprechenden bedingten Anzeige der (maximal) benötigten/erforderlichen Upload-Felder. Deinen Ansatz finde ich aber wesentlich komfortabeler. In einigen meiner Formulare soll aber wirklich nur exakt EIN Upload-Feld möglich sein. Meine Frage dazu (stelle ich gerne noch einmal als neuen Beitrag, falls es zu weit vom Thema abweicht):
Ist es möglich, Visforms mit diesem Feature grundsätzlich so zu erweitern, dass man in der Feldkonfiguration mit einem neuen Optionsfeld "Multiple-Upload" eben dieses Script aktivieren kann, zusätzlich dann bei "ja" in einem weiteren Bedingungsfeld die weiteren zu nutzenden "Reserve"-Uploadfelder auswählen kann, die man natürlich vorher angelegt haben muss (analog der "Bedingte Anzeige")?
ich hoffe das war verständlich genug beschrieben und bin auf deine/eure Antwort gespannt. 

Freundliche Grüße aus PM
Heinz

More
1 year 3 weeks ago - 1 year 3 weeks ago #9121 by Administrator IV
Replied by Administrator IV on topic File upload - multiple files
Hallo Heinz,

unter anderem aus den oben genannten Gründen ist es wichtig bzw. notwendig, die einzelnen individuellen Upload-Felder weiterhin beizubehalten.
Unter gewissen Umständen ist schon möglich, mit dem richtigen JavaScript ein 'Zuschalten' von 'Reserve'-Upload-Feldern zu erreichen.
Für das Formular und den Anwender ist das mit Sicherheit übersichtlicher und eine Erleichterung.
In der Administration würde für den Formular-Ersteller die Konfiguration der von dir beschriebenen (statisch konfigurierten) Steuer-Listbox der bedingten Anzeige entfallen.

Es sind aber auch Fallstricke zu beachten.
Die Feld-Einstellung 'Pflichtfeld'  kommt dem Feature 'Zuschalten' von 'Reserve'-Upload-Feldern leicht in die Quere.
Auch wird abhängig vom gewählten UI-Framework und Sub-Layout das HTML/CSS unterschiedlich benannt/gerendert.
Das und andere Umstände müssen im JavaScript berücksichtigt werden.

Ich denke aber, dass trotz allem auch bei dieser Anforderung, ein zuschaltbares JavaScript eine tolle Möglichkeit wäre.

Ich habe daher einen Issue zur Entwicklung für die Wunschliste angelegt:
Issue [VF-774] Forum: Upload-Field: Add multiple upload-fields handling: show only one unused upload-field in form

Es gibt da noch einen anderen übergeordneten Issue, der damit direkt zusammenhängt.
Issue [VF-772]  Forum: Provide CSS and JavaScript repository and mechanism to bind features to form fields

Sinn davon ist, genau solche JavaScript/CSS Kombinationen Feature-basiert an Formular oder Felder zu binden.
Die Bindung erfolgt über das Setzen einer vordefinierten CSS-Klasse in der Formular- bzw. Feld-Konfiguration (Gruppe 'Layout').

Diese 'lose' Bindung hat den Vorteil, dass nicht gleich jedes Mal in der Konfiguration ein komplett neuer Parameter hinzugefügt werden muss.

Wenn wir das neue Feature releasen, wirst du explizit über das Release hier im Thema informiert.
Vielen Dank nochmal für dein Reinhängen!

Für das Upload-Feld gab es übrigens kürzlich den folgenden Vorschlag bzw. Nachfrage:
vi-solutions.de/en/forum-index/19-joomla...for-file-upload#9106

Liebe Grüße, Ingmar

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).
Last edit: 1 year 3 weeks ago by Administrator IV.

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum