• When there is an error on the form Gravity Forms allows you to remove the previously uploaded file by providing a red “x” that you can click on to remove. With this Plugin activated this does not work. My guess is that that there is a “gformDeleteUploadedFile()” function that runs when you click on the “x” that has an argument for the Form ID, which is now different with this plugin enabled. I would suggest looking into any Hooks and Filters for this function to see if you can update your Plugin to work with this.
    Let me know if you need any more details.
    Thanks

Viewing 1 replies (of 1 total)
  • Hey @ggedde! Just came across the same issue. And eventually came up with a little hack to power this thing up.

    
    $(document).on('gform_post_render', function (_, form_id) {
      $(this).on('click keypress', '.gform_delete', function (e) {
        e.preventDefault();
        const field_id = $(this).attr('onclick').split(',')[1].trim();
        gformDeleteUploadedFile(form_id, field_id, this);
        $(this).parents('.gfield').find('input').prop('disabled', false);
      });
    });
    

    Just add this javascript and remove buttons should start working again

    • This reply was modified 4 years, 3 months ago by goodleby.
Viewing 1 replies (of 1 total)
  • The topic ‘Unable to remove file upload on error’ is closed to new replies.