🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms Photo Gallery Integration Premium Add-on Setup Guide

Updated 9 min read Gravity Forms Integrations A–Z
On this page
  1. Video walkthrough
  2. What you need
  3. Install and activate
  4. Your first feed
  5. How an image gets into the gallery
  6. Which pictures are used
  7. Folder for the pictures
  8. Choosing the gallery
  9. One gallery chosen here
  10. The gallery the visitor picks
  11. A new gallery for every entry
  12. Albums
  13. Approval
  14. Alt text and description
  15. Entry screen, entry list and merge tags
  16. Conditional logic, payments and notes
  17. Files and privacy
  18. What it does not do
  19. Troubleshooting
  20. Questions
  21. Does it work with the Media Library?
  22. Does it work with the premium version of Photo Gallery?
  23. Can visitors upload without an account?
  24. Is the original file changed?

Video walkthrough

Gravity Forms Photo Gallery by 10Web: Visitor Photo Uploads with Approval (Free Plugin)
Video tutorial: Gravity Forms Photo Gallery Integration Watch on YouTube

The Gravity Forms Photo Gallery Integration Premium Add-on turns the pictures your visitors send through a Gravity Forms File Upload field into images of the free Photo Gallery plugin by 10Web. The images go into a gallery you choose, a gallery the visitor picks from a list, or a brand new gallery for every entry. The gallery can be put into an album, again by your choice or by the visitor. Each image gets an alt text and a description from the form, a thumbnail, and an entry in the Photo Gallery tables, exactly as if an editor had added it in the gallery screen. Nothing leaves your server and no outside service is contacted.

You can publish the images at once, or hold them until you approve them. A held image is saved but hidden, so the public gallery shows nothing until you press Approve images on the entry screen. Reject images deletes the images and their files.

What you need

  • WordPress 6.5 or newer and PHP 7.4 or newer.
  • Gravity Forms 2.9 or newer. The add-on is tested with Gravity Forms 3.1.2 on PHP 8.3 and Gravity Forms 2.9.8 on PHP 7.4.
  • The free Photo Gallery plugin by 10Web, version 1.8 or newer. The add-on was written and tested with 1.8.48.
  • An active license key for this add-on.

If Photo Gallery is not active, the add-on says so with a notice in the WordPress admin and on the feed list, and a feed does nothing until it is active.

Install and activate

  1. Install and activate the add-on like any plugin, after Gravity Forms and Photo Gallery.
  2. Open Forms → Settings → Photo Gallery and enter your license key. Without an active license no feed can be created and no image is saved.
  3. Open the form that has a File Upload field, go to Settings → Photo Gallery and add a feed.
A Gravity Forms photo contest form with the fields Your name, Your photo, Gallery, Caption, Describe the photo and Album, where the Gallery and Album drop downs list the galleries and albums of Photo Gallery
An ordinary Gravity Forms form. The Gallery and Album lists are filled from Photo Gallery.

Your first feed

A feed is one rule: when this form is sent, take the pictures and put them in this gallery. Give the feed a name, leave the File Upload fields ticked, keep One gallery chosen here and pick a gallery from the list. Save the feed, send the form once with a picture, and open the gallery in Photo Gallery. The image is there, with its thumbnail, in the last place of the gallery.

The Photo Gallery feed settings: the File Upload fields, the gallery choice, the album choice, the lists for the form fields, the image details with merge tag buttons and the approval setting
The feed settings: which gallery, which album, the image details and the approval.

For every uploaded file the add-on checks that the name is a jpg, png, gif or webp name, that the bytes really are a picture, and that the file sits inside the Gravity Forms upload folder. It then does what the Photo Gallery file manager does. In a folder inside the Photo Gallery upload folder it saves three files: the picture, cut to the maximum size set in the Photo Gallery options (1200 by 1200 by default); the thumbnail, cut to the thumbnail size of the same options (500 by 500 by default); and the untouched original in a hidden folder. A small picture is never enlarged. Then it adds one row to the Photo Gallery image table with the file name, the paths of the picture and the thumbnail, the file size, the pixel size, the alt text, the description, the date and the order. The copy that Gravity Forms keeps with the entry stays where it is.

Nothing is written to the WordPress Media Library, so your library stays clean. The add-on only writes to the Photo Gallery tables and folders, and only in the ways the Photo Gallery editor itself does. Galleries that Photo Gallery builds from another source are never touched.

Which pictures are used

Every File Upload field of the form is ticked by default; untick a field to leave it out. The single file field and the multiple file uploader both work. Only jpg, jpeg, png, gif and webp files are used. Other files are skipped with a note on the entry, and so is a text file that only pretends to be a picture. Most images per entry sets a limit from 1 to 50; extra pictures are skipped with a note.

Folder for the pictures

The box Folder for the pictures names the folder inside the Photo Gallery upload folder where the three files are saved. The default is gravity-forms. Use letters, digits, dash and underscore; anything else is cleaned away. A file name that already exists in the folder gets a number, so a second picture with the same name never replaces the first.

The simplest rule. Every picture of the form goes into one gallery.

Add a Drop Down or Radio Buttons field to the form. In the feed choose it as the Gallery field and also in List the galleries in this field. The add-on then fills the list with your galleries when the form is shown, and the value of every choice is the gallery number. When the form is sent, the add-on checks the answer against the same list. A visitor cannot put pictures into a gallery that is not on the list, even if the form is changed in the browser. You can add a Gallery when the field is empty as a fallback.

Two settings limit the list. Never these galleries takes gallery numbers separated by commas. Only galleries and albums made by the logged-in user shows each logged-in user only the galleries that user made, and shows visitors none.

A new gallery for every entry

Switch Gallery to A new gallery and type a name with merge tags, for example {form_title} – {Your name:1}. The tags {entry_id}, {form_title}, {user_login} and {date} also work. The add-on makes a real Photo Gallery gallery with its public page, a description from a second template, and the status you choose. New or existing decides whether every entry gets its own gallery, whether entries with the same name share one gallery (one gallery per event, per customer or per contest category), or whether a logged-in user keeps one gallery of their own.

Albums

Photo Gallery shows galleries inside albums, which it calls gallery groups. In the section Which album choose Put the gallery in one album chosen here, or Put the gallery in the album the visitor picks in a form field and fill that field with the list of albums, the same way as the gallery list. The gallery joins the album once, however many entries follow, and its place in the album is the next free place. A gallery that is already in the album is left alone. An album the feed does not allow is refused and noted on the entry, and you can set an album for an empty field.

Approval

With Approval set to hold, the images are saved with the Photo Gallery status Unpublished. They exist in the gallery screen for the admin, but visitors see nothing. A gallery that the feed made is saved as a draft, and it joins its album only after approval. On the entry screen the box Photo Gallery shows the status, the gallery, the album and the thumbnails, with the buttons Approve images and Reject images. Approve shows the images, publishes the draft gallery, puts it in the album and fills the preview image of the gallery. Reject deletes the rows and the three files of every image. Both buttons need the right to edit entries and a valid nonce.

The Photo Gallery box on a Gravity Forms entry screen: the waiting for approval status, the gallery and album, the thumbnails of the images and the Approve images and Reject images buttons
The entry screen with the images that wait for approval and the two buttons.

Two notification events appear on forms that have a feed: Photo Gallery: images approved and Photo Gallery: images rejected. Use them to tell the sender.

Alt text and description

The boxes Title, Alt text and Caption take merge tags, so you can use any field of the form. Extra tokens work in these boxes: {filename} (the file name without its extension), {index} (1, 2, 3 and so on for several pictures) and {entry_id}. Photo Gallery stores one text for the alt and the title of an image, so the add-on uses the alt text, and the title when the alt text is empty, and the file name when both are empty. The caption is the description of the image, which Photo Gallery shows in the lightbox. It is plain text; HTML is removed.

Entry screen, entry list and merge tags

Every entry that was handled gets the box described above and entry notes that list what was added, what was skipped and why. Two optional entry list columns and filters show the gallery number, the album number and the status.

  • {pgl_gallery_url}: the public page of the gallery (empty until the images are approved).
  • {pgl_gallery_id} and {pgl_gallery_name}: the number and the name of the gallery.
  • {pgl_album_id}: the number of the album, if one was used.
  • {pgl_image_count}: how many images were saved for the entry.
  • {pgl_status}: pending, approved or rejected.

Use them in confirmations and notifications. With two feeds on one form the tags describe the last one.

Conditional logic, payments and notes

The feed has the usual condition box: add the images only if a field has a value. If the form takes a payment, the option Add the images to the gallery only when payment is completed waits for the payment.

Files and privacy

The add-on contacts no outside service. It copies pictures that Gravity Forms already stored on your server into the Photo Gallery folder, so each picture exists as the entry copy, the gallery picture, the thumbnail and the original. Plan your disk space for that and set a file size limit on every upload field. The pictures in the Photo Gallery folder have addresses that work for anyone who knows them, also while they wait for approval, so do not collect confidential pictures this way.

What it does not do

  • It does not move pictures that are already in a gallery.
  • It does not use the paid features of Photo Gallery. Galleries that Photo Gallery builds from another source, such as a social account, are not listed and never filled.
  • It does not delete anything on its own except the images you reject: galleries, albums and pictures stay when an entry is deleted.

Troubleshooting

  • No feed can be added: check the license under Forms, Settings, Photo Gallery, and that the Photo Gallery plugin is active.
  • Nothing happened after the form was sent: open the entry and read the notes. A skipped file, a gallery that no longer exists or a feed condition that did not match is written there.
  • The image is saved but not visible: the feed holds images for approval, or the gallery is a draft until approval.
  • The database tables are missing: deactivate and activate the Photo Gallery plugin once.

Questions

Does it work with the Media Library?

No. It writes to the Photo Gallery folder and tables, the way the Photo Gallery file manager does, and makes no Media Library item.

The add-on uses the tables and folders that the free plugin creates and the premium plugin is built on. It was tested with the free plugin only.

Can visitors upload without an account?

Yes. That is the normal case. The add-on needs no login.

Is the original file changed?

No. The copy in the entry stays untouched, and the add-on keeps an untouched original of the picture in the Photo Gallery folder as well.

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr