Okay
  Public Ticket #2504897
Gravity File Upload
Closed

Comments

  •  2
    chrisburr started the conversation

    The WPDT Plugin is great, as is the Gravity Forms integration add on.

    In the first instance the WPDT table of a Gravity form with a file upload field displays a link for the uploaded file.  However if one allows front end user editing of that table , the editor does not have edit functionality on the upload file. Is that something that will be sorted by you or Gravity?

    The other issue is that on a user editing the table at the front end, on submission of the edited/updated from the link to the uploaded file gets deleted.

    Have you guys come up with a work around on this yet for anyone?

    I'm exploring scope for me to (1) set specific path and naming structure for the upload files using snippets to create filters to dynamically define the path and rename the files that get uploaded in the Gravity Forms; and (2) Dynamically populate another admin/hidden field in the Gravity form, ( using Gravity Perks Populate Anything add-on), with a URL containing that same path and name.  

    This will enable me to exclude the normal Gravity Forms File upload field and, instead, bring the new hidden/admin URL field into a column in the  WPDT table presented as a button  URL. This would fix the link to the uploaded file in a way that should be unaffected by any front end editing of other parts of the the form


    Its a tricky solution as Im on aWP Multisite and I'm still not there yet so I'm just interested to know if any of you guys have already come up with a simpler work around for preserving the link to uploaded files despite front end editing of the form having taken place?


     

  •  2,498
    Aleksandar replied

    Hello Chris

    We're aware of the issue with attachments, but at the moment there's nothing we can do about it. Our developers informed me that this is caused by the manner in which Gravity is saving data. They are going to work with their team in order to resolve this, but I cannot say when it will be fixed, unfortunately.

    The second issue is connected, and editing a row where there is an image, or an attachment will cause the attachment to get deleted. We still don't have a workaround for this.

    I do hope we'll be able to resolve this soon, but honestly, I don't believe Gravity Forms' team works that much with our developers. If I recall correctly, they can't agree on a fix at the moment, and there's not much we can do about this without them.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  2
    chrisburr replied

    Aleksandar


    Thanks for the response.

    I'm now looking at a work around by dynamically populating a new hidden field in Gravity Forms that I can then carry in the table as a URL link to the folder/file (instead of the Gravity file upload field.)


    Thanks


    Chris

  •  2,498
    Aleksandar replied

    Hi again Chris

    I hope that works for you. Please let me know.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  2
    chrisburr replied

    Aleksandar

    Just to let you know that there is work around possible on this.

    I've managed to solve the issue by using the following :

    GW_Rename_Uploaded_Files ( A Gravity Wiz snippet) - to change the name if the uploaded file;

    form_upload_path to change - the location of the gravity form file upload; and

    form_after_submission - to populate a hidden field with the url for the new path and file name.

    The new field is included in the WPDatatable column with data type URL and as a button. 

    I've excluded the original upload field from the table.

    The result is that irrespective of any subsequent editing of the form, the link to the original uploaded file is preserved.  I've also been able to create a path and file name that uses form ID, field entries ( including containing a unique ID field and another text field entry   (For example...../ form_id / XX000123-ENTRYTEXT / XX000123-ENTRYTEXT.pdf)

    I had to use the form_after_submission as the sequential Unique_ID is provided via a Gravity Wiz Perk add-on and that value/entry is only created on form submission.

    All I need to do now is replace the clumsy button with a suitable icon ( For example, an "eye" icon like you use in the WPDatatable back end or some sort of clear 'document' icon)

    Can  WPDatatables support Awesome icons in tables yet?

     


  •  2,498
    Aleksandar replied

    Hi again Chris

    Thank you for this great workaround. I'll save it for later, and will forward it to our developers! I assume you're referring to FontAwesome? If that's true, I believe it won't work with wpDataTables. It looks like they want us to add the icon as HTML and I'd have to dive in deeper, as in - it would require some time doing custom work, but I don't have time for that due to an increased amount of tickets coming in.

    I'll forward it to our developers again, and hope they'll be able to figure something out.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Palestra Digital replied

    Hi chrisburr, can you bring me more details of the process you made?

  • Clement goirand replied

    Hi Chrisburr , i need your help for your solution. 

  •  2
    chrisburr replied

    Ok which bit of the solution you need help on?  

    I haven't managed to create the 'eye ' icon yet as its not high priority for me but the can help on how you set up a file link in  a gravity form fed table that survives an edit.

    I've used the Gravity Perk 'Populate Anything' to populate a new field with the custom file path. Plus the functions mention below to custom name the file and define a custom path/location for the files based on fields in the Gravity form, including a unique sequential ID for the form entry in the file name). 

    I then simply used the WPDTA settings to define the new field containing the file path as a link and display  as a button.

    I used the Code Snippets plugin to create my custom php functions to avoid having to amend the theme functions.php file directly. It is a quick and tidy way of creating custom php functions. I'm no coder but with the help/guides on the  defined php functions and Gravity Perks Ive managed to get what i needed.

    Chris