Grouped Upload: Remove chosen files

Home Forums Quform PHP Grouped Upload: Remove chosen files

This topic is: not resolved
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #21211
    mediteran
    Participant

    Hi 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.
    #21224
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #21230
    mediteran
    Participant

    Hi 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,
    Ralf

    • This reply was modified 6 years, 11 months ago by mediteran.
    • This reply was modified 6 years, 11 months ago by mediteran.
    • This reply was modified 6 years, 11 months ago by mediteran.
    #21239
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #21246
    mediteran
    Participant

    Sorry, 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 6 years, 11 months ago by mediteran.
    Attachments:
    You must be logged in to view attached files.
    #21261
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #21268
    mediteran
    Participant

    This works perfectly, thanks a lot!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy