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.

Inserting file uploads into posts automatically.

  1. infanity
    Member

    I want to use the plugin to take file uploads for video and audio. From what I've been researching it only stores the file but doesn't insert it into the post. Is there a way to store the path to the file upload in a custom field or any other way that allows me to call the file upload path into a custom template so I would't have to add it manually?

    Posted 12 years ago on Tuesday April 10, 2012 | Permalink
  2. I would absolutely love to see this deployed as well. Currently I switch between the post and the media library and insert manually, an automated version would be fantastic.

    Posted 12 years ago on Friday April 13, 2012 | Permalink
  3. twwoodward
    Member

    I think I'm doing that currently by hand coding the html into the post body as part of the content template.

    For instance putting the following html in the content template with {File:3} being the merge tag.

    <ul>
    <li><a href="{File:3}">Download File</a></li>
    </ul>

    What I'd like to figure out an easy way to do is to have that portion not show up if a file is not uploaded. I think I could do conditional logic with two different templates.

    Posted 11 years ago on Monday September 17, 2012 | Permalink
  4. I'm not sure how easy this would be, but you can modify the content template using the gform_after_submission hook or the gform_pre_submission_filter.

    http://www.gravityhelp.com/documentation/page/Gform_after_submission
    http://www.gravityhelp.com/documentation/page/Gform_pre_submission_filter

    I wonder if your idea of conditional logic to select a different content template would work? Have you tried it yet?

    Posted 11 years ago on Tuesday September 18, 2012 | Permalink