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.

clickable images in posts

  1. Hello,

    when you create a form, submitting a post body and an image, you are able to create a content template that embeds the image into the post. so far so good.

    Unfortunately, the image in the post - despite of wordpress' usual behavior - is not clickable but is "burned in" the post.

    If you do the same with wordpress default post editor, the image will be "clickable" and able to be shown completely, in a new page.

    Is there a way I can force gravity forms to embed the image in a "clickable" way?

    Thanks for your help,

    kubante

    Posted 13 years ago on Thursday October 6, 2011 | Permalink
  2. Sure, you can build the image yourself using the content template and add your own anchor around it. But this is basically bring your own mark up at this point so you'd have to handle everything.

    One trick to use with this is appending :url to the post image merge tag. That will ONLY output the URL to the image itself, no other markup. So using this combined with HTML you can do whatever you want.

    For example:

    <a href="{My Post Image:1:URL}"><img src="{My Post Image:1:medium:url}"></a>

    So the default merge tags are designed to work in most situations but if you need to do something more advanced you can roll your own markup.

    Merge tag usage is documented here:

    http://www.gravityhelp.com/documentation/page/Merge_Tags

    Posted 13 years ago on Thursday October 6, 2011 | Permalink
  3. Thanks a bunch Carl!

    Posted 13 years ago on Friday October 7, 2011 | Permalink
  4. Hi Carl,

    sorry to bother you again, but I included the code exactly the way you told me and the image comes up in the post, but not correctly linked. My added code to the content template:

    <a href="{Upload book page:2:URL}"><img src="{Upload book page:2:medium:url}"></a>

    my post:

    http://www.readcandy.com/2011/10/tstest/

    the page source doesn't seem to be created correctly:

    <a href="<img width="1536" height="2048" src="http://www.readcandy.com/wp-content/uploads/test7.jpg" class="size-URL alignnone wp-image-629" alt="test7" title="test7" />“><img src="http://www.readcandy.com/wp-content/uploads/test7-225x300.jpg"></a>

    any ideas?

    thanks ahead and regards,

    kubante

    Posted 13 years ago on Friday October 7, 2011 | Permalink
  5. Hey. I solved this:

    the problem was that the image tag without the size specification, is always replaced by a complete html image tag, instead of only the URL.

    If you add the parameter :size (large, full, medium, etc) then it works perfectly.

    so the correct code would be:

    <a href="{My Post Image:1:full:URL}"><img src="{My Post Image:1:medium:url}"></a>

    Thanks anyways for your help.

    regards,

    kubante

    Posted 13 years ago on Friday October 7, 2011 | Permalink

This topic has been resolved and has been closed to new replies.