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.

Extracting image file upload URL via 'gform_after_submission' and Entry object

  1. colinpurves
    Member

    Hello,

    I have searched all over this forum and outside for some help with this issue I'm having.

    I want to extract the photo file url via the Entry object.

    I've tried calling the entry object post image from an action hook on gform_after_submission.

    All works well except when I need to get the data. I test it with...
    <script>alert('<?php echo $entry[7]; ?>');</script>

    but the output I get in an alert box for this is:

    http://www.giantsintheforest.com/wp-content/uploads/gravity_forms/4-579a0ef92f79dc5030d7b0a999e94fb9/2012/04/Penguins2.jpg|:|photo title|:||:||:|272

    I've tried using the php explode function, to give me just the URL, but cannot split it using a seperator of '|:|'

    My aim is to resize all uploaded images by calling a resize php class function whenever there is an image upload in the form, It may be better to call the action before submission I suppose? I want to keep the images reduced in all areas of wordpress, inc the media library.

    Please help!

    Posted 6 years ago on Thursday April 26, 2012 | Permalink
  2. colinpurves
    Member

    Anyone able to help me?
    BUMP

    Posted 6 years ago on Thursday April 26, 2012 | Permalink
  3. colinpurves
    Member

    It's ok... I fixed it myself anyway. I used a separator of '|' and ignored the displayed colon in the output.

    Working great now.

    Posted 6 years ago on Thursday April 26, 2012 | Permalink
  4. blueprintds
    Member

    Can you elaborate on this? Im having the same issue.

    Posted 6 years ago on Wednesday May 30, 2012 | Permalink
  5. Nothing at all? I'd love a resolution to this as well...

    Posted 5 years ago on Monday December 10, 2012 | Permalink