The Formidable Forms MySQL integration plugin (Formidable DB) saves entries to the MySQL database. It saves data to MySQL’s separate tables and columns. Each form will save 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. It helps you to save submissions to an internal or external (remote) MySQL database.
Other Database Plugins
- WPForms to PostgreSQL plugin
- Contact form 7 database plugin
- Ninja Forms database plugin
- Contact Form 7 Database (wordpress.org)
- More plugins
Formidable Form
It is a demo Formidable form’s front view.
Formidable Forms + MySQL Auto-Generated MySQL Table (phpMyAdmin)
It is an auto-generated MySQL table.
Formidable Forms + MySQLWP-Admin Dashboard
How to Save Formidable Forms to MySQL Database?
Install the Formidable Forms + MySQL WordPress plugin. Then go to Formidable 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}_db4frm_{form_id}. An example is wp_db4frm_105.
If we need to change the MySQL table name, then add the following code to theme functions.php then we can change the table name. We need to save the form from wp-admin after adding the code.
1 2 3 4 5 6 7 |
add_filter('db4frm_form_table_name', 'my_custom_change_entry_table_name', 10, 3); function my_custom_change_entry_table_name($table_name, $form_id, $prefix){ if( $form_id == 105){ $table_name = 'my_custom_table'; } return $table_name; } |
How Does it Generate MySQL Column Name?
The default column name is input_{field_id}.
Example: input_1.
How to Change Formidable Submission Mysql Column Name?
Select the input field from Advanced > MySQL Column Name.
OR
We can change the column name by following the code. Add the following code to theme functions.php
1 2 3 4 5 6 7 |
add_filter('db4frm_form_map_data', 'my_custom_change_column_name', 10, 2); function my_custom_change_column_name($arr, $form_id){ if( $form_id == 105){ $arr['first_name'] = 'my_custom_name'; } return $arr; } |
$79 for an unlimited installation.
Note: Repeated input fields are not supported.
No restrictions. No monthly or yearly fees. You will receive the complete source code.