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.

Automate a File Send with Form Submit

  1. Hello, I would like to have people enter there appropriate information into my gravity form to get a report. Is there a way of automating this process?

    I see it working like this:
    1. Person enters required info into the form
    2. Person hits submit
    3. They get a nice message saying: "Thanks!"
    4. They receive the document or report in their email.. (the one which they entered into the form)
    5. We can track their info via notifications

    What do you think?

    Posted 10 years ago on Wednesday July 6, 2011 | Permalink
  2. I don't see why not. The only issue is going to be the fact that the document is variable based on a selection. The solution to this is going to be to use a drop down for the report selection and you'll have to use a custom notification message, you won't be able to use the {all_fields} merge tag.

    - Create a folder on your web server to store the report files (ex. http://mydomain.com/reports)
    - Upload the report files there
    - Edit your form
    - Add a drop down field to your form
    - Label the drop down "Select A Report" or whatever you want
    - Select the "Enable Values" checkbox
    - For the choices enter the report name as the Choice Label and enter the filename as the Choice Value. For example see this screenshot: http://i.imgur.com/uSWx5.png

    Now when you create your Notification message, you can use the form field variable for that field to display both the Name and the Filename that was selected so you can build a link by using the merge tags for that field.

    So in the notification message body supports HTML and form field merge tags. So you could create a link to that file by knowing the path to it and then outputting the merge tag for that field and appending :value to the end to return the value, which would be the filename.

    For example:

    You can download your report <a href="http://mydomain.com/reports/{My Field:1:value}">here</a>

    That is just an example of getting the value of a field rather than the label. But you can use that to get the filename which is stored in the value of the drop down so that you can output it in the notification message body.

    If you want to store the files securely you could even use something like PluginBuddy's S3 URL's shortcode plugin and implement Amazon S3 expiring links so that the link to the file expires and the file is stored on Amazon S3. The notification message supports shortcodes so the merge tags combined with the shortcode capabilities gives you a lot of flexibility.

    The PluginBuddy S3 URL's plugin can be found here:

    http://wordpress.org/extend/plugins/pluginbuddy-s3-urls/

    As for tracking their info via notifications, i'm not sure what you mean. You'd track their info by the form field data that was submitted. The notification itself is just an email.

    Gravity Forms can do all sorts of things, you just need to be creative in how you implement the available features.

    Posted 10 years ago on Wednesday July 6, 2011 | Permalink
  3. Some of this is complicated for me to understand but is all great information and I certainly appreciate all of it! I'm going to get started now. I'll let you know how it turns out!

    Thank you Carl,
    Barry

    Posted 10 years ago on Wednesday July 6, 2011 | Permalink