WordPress.org

Ready to get started?Download WordPress

Forums

Gravity Forms PDF Extended
[resolved] Display uploaded images (3 posts)

  1. ashbryant
    Member
    Posted 1 year ago #

    Hi,
    I hope someone can help me. I'm having trouble displaying images that I have uploaded via Gravity forms. How do I call on them?

    I have tried this

    $image = $form_data['file']['image upload'];

    but it doesn't work. How do I find the correct path to the upload?

    http://wordpress.org/extend/plugins/gravity-forms-pdf-extended/

  2. Blue Liquid Designs
    Member
    Plugin Author

    Posted 1 year ago #

    Hi ashbryant,

    If you uncomment the print_r($form_data); line in the template file and then generate the template through the admin area you'll get the complete array.

    See Creating an Advanced Template under the plugin's documentation heading:
    http://www.blueliquiddesigns.com.au/gravity-forms-pdf-extended-plugin/#tab-documentation

  3. ashbryant
    Member
    Posted 1 year ago #

    I tried that, but that's not the issue I have. It's getting the url to the file uploaded not echoing out the link to it.

    However I have come up with a solution, so to anyone else having the same issue this is what you need to do.

    Call the info as you have done before for any other field
    $file = $form_data['field']['Upload file'];

    After add this...

    $file_url = new SimpleXMLElement($file);

    Now echoing like this...

    <?php echo $file_url['href']; ?>

    Will echo out the url to that file, which you can add to a src="" for images or anything else you may need.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags