PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

After File Upload, display message confirming upload and filename?

  1. UT RadOnc
    Member

    I want to display a confirmation message when the person uploads a file (using the Advanced File Upload field) that shows the filename. If there's an error submitting the form (e.g. a required field wasn't filled in), it does show the filename, but I can't see a way to display the filename after they've browsed and selected the file for upload.

    The browse field shows the whole address (including the drive and folder names), so the filename isn't visible unless the person knows to click in the field and go to the end of the address. There doesn't even seem to be a way to change the length of the field (whereas many other fields offer small/medium/large sizes).

    If there was a way to use conditional logic to test if the person had browsed and selected a file, I could create my own message (using HTML with conditional logic), but there doesn't seem to be any way to check if a field is empty and there's no way to know what the filename will be.

    Many thanks for the help.

    Posted 11 years ago on Monday February 4, 2013 | Permalink
  2. David Peralty

    Gravity Forms doesn't process file uploads until the user clicks submit. If you are using a different add-on for file uploads, then you'll have to talk to those developers about a way to check if the field is empty or not.

    Posted 11 years ago on Monday February 4, 2013 | Permalink
  3. UT RadOnc
    Member

    I'm not using an add-on - just plain ol' Gravity Forms. :-) However, thanks for getting back to me, David.

    Posted 11 years ago on Tuesday February 5, 2013 | Permalink
  4. David Peralty

    Ah, when you said "Advanced File Upload field", I got confused by what you meant. The upload field is just a normal HTML upload field and can't be managed or changed in any way beyond what a normal HTML upload field can be changed/manipulated.

    Posted 11 years ago on Tuesday February 5, 2013 | Permalink
  5. Can it be changed where the file uploads to?

    Posted 11 years ago on Tuesday February 26, 2013 | Permalink
  6. You can change where the uploaded files are stored by using the gform_upload_path filter:

    http://www.gravityhelp.com/documentation/page/Gform_upload_path

    That code will be added to your theme's functions.php file.

    Posted 11 years ago on Tuesday February 26, 2013 | Permalink