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.

Check for populated image fields when adding to content template

  1. shayh
    Member

    Hi,

    I've just come across "create content template" and merge tags - how did I not find these options sooner :(

    Anyway, I have a post form that can have 1 to 5 photos uploaded. I would like to be able to add a [gallery] shortcode to the post body field only if at least two of these image fields are populated.

    Is it possible to check for this and if true add the gallery shortcode to the post body field?

    Thanks,
    Shay

    Posted 11 years ago on Tuesday November 20, 2012 | Permalink
  2. David Peralty

    There isn't currently a way to do that currently because we don't have a built-in way to count the number of fields with values.

    Posted 11 years ago on Tuesday November 20, 2012 | Permalink
  3. shayh
    Member

    OK, no problem. Thanks for getting back to me on this.

    Shay

    Posted 11 years ago on Wednesday November 21, 2012 | Permalink