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.

Post image - not showing in post

  1. John
    Member

    Hi, I'm new to GF but familiar with WP and web dev. I've purchased and installed GF and created a test form but the images are not showing up on the posts created by the form.

    So far I have:
    -Installed a new copy of WP then added and activated the latest version of GF.
    -Created a new form with all the 'Post fields' added
    -Added the form to a new WP page
    -Tested the form

    Each time all the fields work great except the image. The image file is uploaded correctly to the gallery, but just not inserted into the post.

    I don't know if this is a configuration issue or a bug. I've searched the documentation and forums and don't see this issue reported.

    Thanks in advance for your help. I can't wait to get this going.

    Posted 13 years ago on Tuesday February 8, 2011 | Permalink
  2. Post Images are not inserted into the Post Body automatically. All a Post Image does is upload an image to your media library and associated it with the Gallery for that post. It isn't automatically added to the Post Body content because Gravity Forms wouldn't know where it is supposed to go.

    Just like when you upload an image when adding a new Post in WordPress the image isn't automatically added into your post content. You have to insert the image into the Post Body after uploading it or you use the gallery shortcode or modify your theme to show the images using code.

    Use the "Content Template" functionality of the Post Body field. This lets you control the Post Body content that is created and insert the values of other fields into the Post Body before it is created. Turn this on and then you will get a textarea where you can control the Post Body Content by inserting HTML or using the "Insert form field" drop down to insert form field variables just like in the email notifications.

    To use the Content Template functionality you would then select the Post Image field from the "Insert form field" drop down and it would then insert a form field variable into the content template. If you use the content template you also need to be sure to insert the Post Body variable itself, otherwise it won't output the value of that field. Whatever is in the content template is what will be used to create the content of the post.

    Posted 13 years ago on Tuesday February 8, 2011 | Permalink
  3. John
    Member

    Thanks for the quick response! I just checked out the 'Content template' options in the 'Post Body' settings and got it setup quickly.

    Thanks for the great support. Maybe you could add a note in the documentation about this.

    Posted 13 years ago on Tuesday February 8, 2011 | Permalink