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.

Posts are Being Closed without any Comments

  1. studio57designs
    Member

    This post http://www.gravityhelp.com/forums/topic/default-image-when-using-content-template was closed....not sure why....maybe that's why I never got a response and then I opened another and it was closed as well.

    Support has always been good. What's up?

    Any help would be greatly appreciated. Please don't close the post.

    Thanks,
    Louise

    Posted 11 years ago on Tuesday June 11, 2013 | Permalink
  2. Louise,

    It looks like that post got spammed, so not our fault there. As such, we are unable to view that post - would you mind copying and pasting your issue into this thread for us?

    Posted 11 years ago on Tuesday June 11, 2013 | Permalink
  3. studio57designs
    Member

    Thanks Rob.....I did not mean to post twice....the forum wasn't responding after I hit the "submit post" button.

    I've created a testimonial form that posts to a page after submission. The submitter is able to upload a picture with their testimonial...which works fine. But, I'm wanting to add a default image, if they do not submit an image.

    I am using the Content Template and I don't see any way to have a default (if/then) type statement.

    How is this handled?

    Thanks,

    Louise

    Posted 11 years ago on Tuesday June 11, 2013 | Permalink
  4. Louise, you can handle this in your theme, but not in the content template. If/Then/Else statements are not supported in the content template in Gravity Forms. However, you can create a page template to use for your Gravity Forms testimonial submissions which has logic which says, in effect:

    [php]
    if (there was an image uploaded) {
      use that image in the post;
    }
    else {
      use this default image;
    }

    That is how you can do it in the page template.

    If you did not want to do that, you can use the gform_pre_submission_filter to insert the value for a default image, into the field where the upload would go, if the upload field is empty when the form is submitted. The documentation for the gform_pre_submission_filter can be found here: http://www.gravityhelp.com/documentation/page/Gform_pre_submission_filter

    Posted 11 years ago on Tuesday June 11, 2013 | Permalink