WS Form PRO was the first WordPress form plugin to integrate with OpenAI, allowing you to generate forms for WordPress dynamically using AI by providing a simple prompt.
In this tutorial, we’ll walk you through the process of creating an AI generated form using WS Form’s OpenAI integration.
Install the OpenAI Add-On
To enable the AI generated forms feature in WS Form PRO, you first need to install and activate the OpenAI Add-On in WordPress.
- Download the OpenAI Add-On.
- Navigation to the WordPress plugins page.
- Click Add New Plugin.
- Click Upload.
- Choose the OpenAI Add-On zip file.
- Follow the on-screen instructions to Install and Active the plugin.
Obtain an API Key from OpenAI
To use the OpenAI integration, you need an API key from OpenAI.
- Go to OpenAI’s website.
- Sign in or create an account.
- Navigate to the API Keys section.
- Generate a new API key and copy it.
Configure the OpenAI Add-On in WS Form
- In your WordPress dashboard, go to WS Form > Settings.
- Click the OpenAI tab.
- Add your OpenAI License Key obtained when you downloaded the OpenAI add-on.
- Paste the OpenAI API Key obtained in the previous step.
- Click Save Changes.
Create an AI Generate Form
To create a form for WordPress from a prompt:
- Click Add New in the WS Form WordPress admin menu.
- Click the OpenAI tab.
- Click Use Template on the AI Generated Form template.
- Enter a Prompt, then click Create.
How to Write a Prompt
Prompts should be written in natural language.
Simple Prompts
Example basic prompts are:
- A dog adoption form.
- A doctor appointment form.
- A form for booking a rental property.
- A membership form for a club.
Adding More Context
You can prompt for WS Form to add more functionality to a form. For example:
- A dog adoption form. Add help text to each field to improve accessibility.
- A doctor appointment form. Add a select field that contains reasons for the appointment.
- A form for booking a rental property. Add a check-in and check-out date fields.
- A membership form for a club. Add a file upload field for uploading a member photo.
Calculators
The WS Form AI Generated Form feature can also be used for creating calculators. Example prompts might be:
- A mortgage calculator.
- A window configurator.