Gravity Forms - WPDB / MySQL Connect — is an essential tool for any developer or site administrator looking to expand the capabilities of Gravity Forms. This plugin bridges the gap between your web forms and your database, allowing you to create a seamless flow of information. Instead of being limited to the standard Gravity Forms entry management, you can now directly populate custom database tables, making your data immediately available for other applications, reports, or custom website functionalities.
The plugin provides a user-friendly interface to map your form fields to specific database table columns. It supports a wide range of actions, including inserting new records (INSERT) and updating existing ones (UPDATE), which is perfect for user profile forms or data correction workflows. You can connect to any table within your WordPress database or even establish a connection to an entirely separate, external MySQL database. This flexibility makes it an invaluable asset for creating integrated systems, such as CRMs, directories, or custom data repositories, all powered by your user-friendly front-end forms.
Why This Is Important
Struggling with manual data transfer from form submissions? You're not alone. Manually exporting CSVs and importing them into other systems is a major time sink. Studies show that businesses can lose up to 20-30% of their revenue each year due to process inefficiencies, including manual data entry. Every hour spent on this tedious task is an hour not spent on growing your business. This plugin automates the entire process, eliminating human error and freeing up hundreds of hours per year. It directly connects your forms to your database, ensuring data is instantly and accurately stored where you need it, ready for your apps, reports, or CRM to use in real-time. Stop wasting resources and start building a more efficient, data-driven workflow today.
Features
- Direct Database Connection: Connect forms to any table in your local WordPress ($wpdb) database or an external MySQL database.
- Insert & Update Operations: Choose to either insert a new row on submission or update an existing row based on a specified key.
- Easy Field Mapping: A simple and intuitive interface to map your Gravity Forms fields directly to your database table columns.
- Conditional Logic Support: Execute the database connection only when specific conditions are met in the form submission.
- Custom SQL Queries: For advanced users, there's an option to write custom SQL queries for maximum flexibility and complex operations.
- Multi-Connection Feeds: Create multiple database feeds for a single form, allowing you to send data to different tables or databases simultaneously.
- Error Logging & Debugging: A built-in logging system helps you troubleshoot connection issues and failed queries quickly.
- Secure Data Handling: Uses WordPress best practices for database interactions, ensuring your data transfers are secure.
- Support for All Field Types: Works seamlessly with all standard and advanced Gravity Forms field types, including file uploads.
- Dynamic Data Population: Use submitted data to dynamically name tables or specify conditions, allowing for highly flexible configurations.
Integration Capabilities Overview
| Feature | Standard Gravity Forms | With WPDB / MySQL Connect Plugin |
|---|---|---|
| Data Storage | Internal WP tables only | Any WP or External MySQL Table |
| Record Updating | Manual, via WP admin | Automatic, on form submission |
| External App Integration | Requires API/Zapier (often paid) | Direct, real-time via shared DB |
| Data Structure | Fixed, default structure | Fully customizable to your schema |
| Workflow Automation | Limited | High (e.g., update user profiles) |
| Data Siloing | Data is siloed within WordPress | Data is accessible and integrated |
How to install the plugin?
- Download the plugin archive using the button above.
- Navigate to Plugins > Add New in your WordPress dashboard.
- Click "Upload Plugin" at the top and select the downloaded ZIP file.
- Install, activate the plugin, and follow the quick setup wizard instructions.
FAQ
Can I connect one form to multiple database tables?
Yes, absolutely. The plugin uses a "feed" system. You can create multiple feeds for a single Gravity Form, with each feed configured to connect to a different database table or even a different external database. You can also apply conditional logic to each feed, so data is only sent when specific criteria are met.
Does this plugin support updating existing database records?
Yes, it fully supports both INSERT (creating new records) and UPDATE (modifying existing records) operations. When setting up your feed, you can specify an "UPDATE" action and choose a "key" column. If a form submission contains a value that matches an existing value in your key column, the plugin will update that row instead of creating a new one. This is perfect for editing user profiles or updating order statuses.
Is it secure to connect to an external MySQL database?
Yes, the plugin takes security seriously. Your database credentials (host, username, password) are stored securely in the WordPress database. The connection itself is a standard server-to-server MySQL connection. For maximum security, we recommend ensuring your external database server is configured to only accept connections from your web server's IP address and, if possible, use SSL for the connection.
What happens if the database connection fails during a form submission?
The plugin includes an error logging and debugging feature. If a connection or query fails, the error will be logged for you to review in the plugin settings. The standard Gravity Forms entry will still be created as usual, so no user data is lost. This ensures you can troubleshoot the issue without interrupting your site's ability to capture submissions.