Prevent user from closing form during upload using single upload with upload progress bar

  • SaberRisk
    Asked on January 27, 2018 at 3:58 PM

    Is it possible to prevent the user from closing the form until an upload is complete? Or at least display a warning message?

  • Kevin Support Team Lead
    Replied on January 27, 2018 at 8:28 PM

    As far as I know it's not possible to set up an alert when the users leave the page and the file is being uploaded, you may only set up the field as required so the user is notified when the field is empty and they get the thank you page that means all was sent through. 

    If you want, we could open a feature request for this, please let us know. 

  • SaberRisk
    Replied on January 27, 2018 at 9:56 PM

    Thanks. That is a feature that we would use as some of our uploads can take several minutes - or longer.

  • Nik_C
    Replied on January 28, 2018 at 3:59 AM

    I will forward this to our backend team for further review and possible implementation.

    Thank you!

  • SaberRisk
    Replied on January 28, 2018 at 2:39 PM

    Thank you. In the form validation message settings there is a message that warns that an upload is running. Is there currently a way to trigger this message?

    1517168288Untitled Screenshot 10

  • Nik_C
    Replied on January 28, 2018 at 3:04 PM

    Actually, there is a mechanism in the Browser that prevents the user to close the tab/window if the upload is in process:

    Chrome:

    1517169661Screen Shot 2018 01 28 at 8 Screenshot 10

    FireFox:

    1517169696Screen Shot 2018 01 28 at 8 Screenshot 21

    Safari:

    1517169715Screen Shot 2018 01 28 at 8 Screenshot 32

    You can use my test form and test that:

    https://form.jotform.com/80275402258959

    Could that work for you?

  • SaberRisk
    Replied on January 28, 2018 at 4:29 PM

    Yes . Looks like that could work. A couple of questions -

    How is it implemented?

    I notice that you provided several examples but not IE. Does it work in IE?

    Thanks.

  • jonathan
    Replied on January 28, 2018 at 4:55 PM

    It also work on IE browser when I did a test.

    1517176236zzz 2018 01 29 05 Screenshot 10

    Please check also your IE browser if perhaps it was ignoring or blocking script codes the reason the pop up alert was not being triggered.

    ---

    This functionality is built-in the Upload field. It has the script to detect the closing of the app browser while uploading script is still in progress. This feature was implemented after request from users before for the same reason you mentioned.

    Let us know if you require further assistance.


  • SaberRisk
    Replied on January 28, 2018 at 5:27 PM

    Just tried a couple of ideas in different browsers. Here is what I think is happening.

    It appears to work when I set the upload widget to allow multiple uploads but not when it is set for a single upload.

    The problem for us with the multiple upload tool is that the file begins to upload as soon as the file is selected rather than waiting for the form to be submitted. That doesn't work for our needs as we need other information from the form for the workflow after the file is received on our FTP server.

    I have seen several questions on this forum about a progress bar for single uploads and understand that it is not available.

    Ideally I would to have both a progress bar and the warning message. Looks like that is not possible.

    Thanks for your help.


  • jonathan
    Replied on January 28, 2018 at 5:38 PM

    The problem for us with the multiple upload tool is that the file begins to upload as soon as the file is selected rather than waiting for the form to be submitted.

    I think there is a misunderstanding on this.

    The upload progress indicator when using the multiple upload field option does not upload the file yet during the session. It only temporarily saved the session on the browser but not yet completely uploaded to the file upload server.

    The form still needs to be submitted. The uploaded file will only be transferred after post submission session of the form.

    So this also means that the uploaded file will only reach your FTP server after post submission only.

    ---

    I have seen several questions on this forum about a progress bar for single uploads and understand that it is not available.

    This is correct. The upload progress session indicator is only enabled on multiple upload mode of the Upload field.

    Perhaps you can just use the allow multiple upload option on your upload field so you can make use of the upload progress indicator.

    Thanks.

  • SaberRisk
    Replied on January 28, 2018 at 6:20 PM

    I really appreciate the clarification. The problem that I see is that the user will be warned while the file is "uploading" but once it says it is finished the user can close the form without actually submitting the upload or the form information.I just tested it and that is what appears to happen.

    For one client request we are working on we have a very small number of users and we can probably give them instructions to avoid that scenario. However in other situations that is going to be more of a problem.

    Again I really appreciate all the feedback and incredibly prompt responses. From other posts on this forum it looks like other users are looking for similar features - a "true" progress bar for single uploads and the existing warning message for single uploads. Thanks again for your help.

  • jonathan
    Replied on January 28, 2018 at 6:26 PM

    Thank you for the explanation and clarification. We have submitted a feature request ticked base on the details you provided on this thread.

    We will notify you here for any news/updates on the progress.

    Best

  • SaberRisk
    Replied on January 28, 2018 at 6:34 PM

    Thanks again. I really appreciate the outstanding support.