The Fluent Forms and MySQL Database integration plugin. It saves Fluent Form submissions to the MySQL database. It saves form entries to MySQL’s separate tables and columns. Each form will be saved to a separate table.
The column name is based on the input label or placeholder. We can change the table or column name by filter hooks.
Other Database Plugins
- WPForms to PostgreSQL plugin
- Contact form 7 database plugin
- Ninja Forms database plugin
- Contact Form 7 Database (wordpress.org)
- More plugins
Fluent Form
It is a demo of Fluent form’s front view.
Fluent Forms + MySQL Auto-Generated MySQL Table (phpMyAdmin)
It is an auto-generated MySQL table.
Fluent Forms + MySQLWP-Admin Dashboard
How to Save Fluent Forms to MySQL Database?
Install the Fluent Forms + MySQL WordPress plugin. Then go to Fluent DB > Switch Database > Add MySQL Credentials. Enable the remote MYSQL server if you want to connect to remote MYSQL.
Now, We can see new tables created in our MySQL database. We can add an internal or remote database.
How Does it Generate MySQL Table Name?
The default table name is {prefix}_db4fluent_form_{form_id}. An example is wp_db4fluent_form_4.
If we need to change the MySQL table name, then add the following code to the selected theme functions.php then we can change the table name.
1 2 3 4 5 6 7 |
add_filter('db4fluent_form_table_name', 'my_custom_form_table_name', 10, 3); function my_custom_form_table_name($table_name, $form_id, $prefix){ if( $form_id == 4){ $table_name = 'my_custom_table'; } return $table_name; } |
How Does it Generate MySQL Column Name?
The default column name comes from the input field label or placeholder.
Example: Label is First Name then the MySQL column name is first_name.
We can change the column name by following the code. Add the following code to theme functions.php and save the form from wp-admin.
1 2 3 4 5 6 7 |
add_filter('db4fluent_form_map_data', 'my_custom_change_column_name', 10, 3); function my_custom_change_column_name($arr, $form_id){ if( $form_id == 4){ $arr['first_name'] = 'my_custom_name'; } return $arr; } |
Not updating column name from phpMyAdmin (MySQL) issue
Go to wp-admin > fluent form > select form > press on the “Save Form” button once more.
$79 for an unlimited installation. No monthly or yearly fees.