Home › Forums › Quform PHP › Grouped Upload: Remove chosen files
- This topic has 6 replies, 2 voices, and was last updated 8 years, 3 months ago by
mediteran.
- AuthorPosts
- May 4, 2017 at 7:06 pm #21211
mediteran
ParticipantHi there,
I’m new to Quform PHP (which is great, btw), but didn’t have bigger difficulties up to now, despite being a dummy in HTML, CSS, and PHP 😉
In my form, I’ve got a “grouped upload” field. How can I manage to remove a file if I accidently chose something what I didn’t intend to upload? Maximum uploads are 3, minimum is set to just 1 file.
Couldn’t find anything regarding this in the documentation and in this forum…
Attachments:
You must be logged in to view attached files.May 8, 2017 at 4:37 pm #21224Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
May 8, 2017 at 6:57 pm #21230mediteran
ParticipantHi Ally,
thanks for your reply.
But I’m missing something within your code. Where should the link direct to? I’m sure that the hash should be replaced by something else, but with what?
How does it know on click that it should execute the JavaScript? I don’t see any relation to it.
Regards,
RalfMay 8, 2017 at 8:56 pm #21239Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
May 9, 2017 at 9:38 pm #21246mediteran
ParticipantSorry, but I seem to be a dummy.
The related code looks as:
<!-- Begin Grouped Upload element --> <div class="quform-element quform-element-file"> <div class="quform-spacer"> <label>Dateien auswählen: <span class="quform-required">*</span></label> <div class="quform-input"> <div class="quform-input-file"> <input type="file" name="uploads[]" /> <a href="#" class="clear-file">Clear</a> </div> <div class="quform-input-file"> <input type="file" name="uploads[]" /> <a href="#" class="clear-file">Clear</a> </div> <p class="upload-explanation">Erlaubtes Dateiformat: .jpg. Maximale Dateigröße 20 MB pro Foto. Mindestens eine Datei erforderlich.</p> </div> </div> </div> <!-- End Grouped Upload element -->
Additionally, I tried to add a reference to the Quform JavaScripts, at the end of the <body> part of my page:
<script src="/quform/js/scripts.js"></script> <script src="/quform/js/jquery-1.8.3.min.js"></script> <script src="/quform/js/plugins.js"></script>
I don’t get any reaction when clicking on the “Clear” link. Maybe it’s relevant, the page is based on Bootstrap. For any case, I attached the related HTML file.
Regards,
Ralf- This reply was modified 8 years, 4 months ago by
mediteran.
Attachments:
You must be logged in to view attached files.May 13, 2017 at 6:16 pm #21261Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
May 14, 2017 at 5:45 pm #21268mediteran
ParticipantThis works perfectly, thanks a lot!
- This reply was modified 8 years, 4 months ago by
- AuthorPosts
- You must be logged in to reply to this topic.