How to use OpenAI Vision with Gravity Forms

by | Last updated Jun 23, 2024 | AI for Gravity Forms, Gravity forms, Styles & Layouts | 0 comments

Overview

OpenAI Vision used with image from Gravity Form to create AI text.

OpenAI’s vision capabilities allow users to upload one or more images and ask questions regarding them. There are plenty of use cases in which it can come in handy like

  • Automatic suggestion for captions, alt tags, and titles for uploaded images
  • Automatic verification of uploaded images for faces or checking for nudity or other checks.
  • Help in planning a meal from the uploaded image of the user’s refrigerator

In this article, we will integrate Vision API with Gravity Forms using a no-code solution.

Gravity Forms Integration with Vision AI

Plugin required to integrate Gravity Forms with OpenAI.

AI for Gravity Forms plugin lets you integrate OpenAI features with your forms. It has support for Vision AI that can take images as input and answer questions regarding the things present in images. You can map the Vision AI response to Gravity Forms entry notes or form fields.

Setting up Gravity Forms with Vision AI

The integration between Gravity Forms and OpenAI vision can be done using the following two plugins

Gravity Booster is a free plugin that has 100+ controls to design the different parts of Gravity Forms. The AI for Gravity Forms works together with Gravity Booster to add AI capabilities like, text generation, label generation, image generation, and Vision capabilities in Gravity Forms.

Enabling Vision AI in Gravity Forms

Booster menu item under Forms in WordPress Backend.
  • After installing and activating AI for Gravity Forms navigate to Forms -> Booster from your website’s backend.
  • Select the form for which you want to enable Vision AI. After the form selection, the page will automatically reload with controls and form preview.
  • Now click the Settings icon and go to the AI Section to add your OpenAPI Key.
  • Now go to AI Panel and then click on the Vision section.
  • In the Vision section, you can enable the feed, set the feed name, select the vision AI model, set the detail, max tokens, form image field, prompt, and the field where the Vision AI response should be saved inside the Gravity Forms entry.

Step-by-step guide for Using Vision AI with Gravity Forms

Let’s assume that you have a resume builder website where you require a profile picture from the user. In such a case you can use Vision AI to detect the face inside the pic. The good part is that if you need multiple images then a multi-file upload field is also supported and the vision AI will check faces in all the uploaded images.

Create a Gravity Form with a File Upload Field

Create a new Form and add the following fields in it.

Resume Builder Form made with Gravity Forms.
  • Name: It will contain the first and last name.
  • Age: This is a number field.
  • Address: It is the advanced address field provided by Gravity Forms.
  • Profile Pic: It is a single file upload field. The field is restricted to support only .png, .jpeg, .jpg, and .webp files. 
  • Additional Details: This is a textarea field where users can enter all the details they want to show in the resume.

After setting up the form add it to a page in the frontend where users can fill it.

Enable Face Detection using Vision AI

How to use OpenAI Vision with Gravity Forms

For this follow the below steps

  • Navigate to Forms -> Booster and select the form we just created.
  • Here under the AI panel go to the Vision section and do the following settings.
    • Enable the Feed by clicking on the checkbox.
    • Set the Feed Name to Face detection. This name is for your reference and if you map the vision AI results to Gravity Forms entry notes then it will display over there as well.
    • For the AI model select GPT-4o as it is the latest and most cost-effective model yet.
    • Keep the detail setting to Auto 
    • Set the max token to any number greater than 300. If Vision AI decides to use high detail even then it will use a maximum of 300 tokens. However, if you have used multi-upload files and sent multiple files so, you have to consider tokens for each file separately.
    • In the Take Image From select the file upload file which in our case is the Profile Pic field.
    • In the prompt, you can type the following for human face detection “Detect if a human face is present in the provided image. Return a true or false indicating the presence of at least one human face.
    • You can Map the results to the Notes field. So, whatever response we get from Vision AI is stored in Gravity Notes and while editing the entry from the backend you can immediately know if the user has uploaded a correct profile pic or not.
  • After all these settings click on the Save button.

Testing Gravity Forms Integration with Vision AI

Open AI Vision result in notes in Gravity Forms

To test the integration with Vision AI submit the form once with a wrong image that doesn’t contain any human and once with an image of a human. After this go to the backend and check the entry notes for both submissions.

The entry notes will contain the results or any errors it faced while executing the Vision AI prompt.

Still stuck? Need custom solution? We can help

Great work!

Thank you guys! extremely helpful!

Excellent

Makes styling Gravity Forms EASY.

Great stuff!

I rarely take the time to leave reviews.
With this one I felt compelled because it is so good!

I love it

Easy and efficient plugin !

Good Plugin

A bit of a learning curve for this old woman, but does what I need it to do!!

It Works Perfectly

If you need to give your form a bit of style, this plugin is perfect and easy to use.

Very good and beautiful

It worked very good used with divi theme, popup builder and gravity forms!
CongraTulations!

Great Plugin Essential!

Very easy to use, exactly what I needed for Gravity Forms!

Fantastic plugin!

This plugin saved me hours of work. I am not well versed in coding by hand and now I don’t have to figure it out. I styled my Gravity Forms beautifully, the easy way. Worked perfectly. Thank you.

Great Gravity plugin

This is great for all those styling problems that can arise. Easy to use with a gentle learning curve.

Very Helpful!

Gravity forms are awesome, but notoriously difficult to style. I was struggling for hours to reduce the space between a field, let alone tweak size, color, etc. This plugin is exactly what I was looking for – well done!

Should be default Gravity Forms functionality

Great plugin. My go to solution for Gravity Forms styling.

Exactly what I was looking for

I don’t know CSS and was asked to make very specific changes to our Gravity Forms. This did the trick and this tool gave me the flexibility I needed.

Very Useful

Instead of playing with the style sheets, you can make all the changes directly here.

Excellent plugin

Easy and intuitive to use and helps to accelerate workflow.

great!

works great! should be in the gravity basic installation…

A great find!

This plugin enabled me to exactly what I wanted to with my forms and they look great! It would have been much more painful to customize my forms without it.

It is a amazing gravity form plugin that I was looking for long time.Thanks

Thanks for helping for designing gravity form such an amazing way.

Just what I needed!

Love love love this plugin. Who wants to spend hours using css to style a form?
Not me! I can get my forms looking exactly as I want them to in just a few clicks.

Perfect

It works perfectly. I am satisfied. Congratulations!

Much better than forms that come with the themes

Solid plugin, much better than the forms that come with the themes. We’ve used GF to create membership and donation forms, which our clients love. I thought GF was a little pricey but it’s paid for itself in customer satisfaction.

Easy to use and powerful

Recommend this to anyone struggling to format their forms

Just right!

Outstanding! Does just what I wanted.

Excellent plugin

Makes the job of styling forms so much easier.

Very convenient, works great!

I’ve had a need to sometimes change the style of Gravity Forms, and this saves time so I don’t have to figure out the CSS styles and manually override them 😉

great plugin – easy to use

this plug in was exactly what i needed to help finish the layout of my page.

I love it!

Works Great for Me

This app is easy to understand and use and works great for me.

Great Plugin

This plugin is a perfect complement to style Gravity-Forms. The intuitive user interface, integrated into the Customizer, is very well done. PERFECT!!! THANK YOU!!!

Super Awesome and Easy to Use

Really great plug in that is so easy and simple to use! Thank you for your awesome work!

Huge time saver

You can accomplish what this plugin does using CSS yourself, but the plugin saves you the time of doing so. This is a simple, effective and efficient way of making your GF look better.

Save me hours of work

I was skeptical to download…how can it be that easy? But, it was and it truly saved me hours of work to style my Gravity Forms.

Exactly what Gravtiy Forms missed

I use it on every page – that should say it all.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *