The Forminator database (DB4 Forminator) plugin saves submissions to an internal or external (remote) MySQL database.
You can easily develop CRM also by this Forminator database (DB4 Forminator) plugin. Add MySQL credentials from wp-admin then It will automatically generate Mysql tables.
Other Database Plugins
- Contact form 7 database plugin
- Ninja Forms database plugin
- Contact Form 7 Database (wordpress.org)
- WPForms MYSQL plugin
How to Save Forminator Entries to MySQL Database?
Install the DB4 Forminator WordPress plugin. Then go to DB4 Forminator > Switch Database > Add MySQL Credentials.
Now, We can see new tables created in our MySQL database (PHPMyAdmin).
Forminator Auto-Generated MySQL Table (phpMyAdmin)
The WP-Admin Forminator Entries Dashboard
How Does it Generate MySQL Table Name?
The default table name is {prefix}_db4forminator_{form_id}. Example is wp_db4forminator_39.
If we need to change the forminator MySQL table name, then add the following code to theme functions.php and save the forminator form from the wp-admin dashboard.
Now, we can see the table name is changed.
1 2 3 4 5 6 7 |
add_filter('db4forminator_form_table_name', 'my_custom_change_entry_table_name', 10, 2); 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 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
1 2 3 4 5 6 7 |
add_filter('db4forminator_form_map_data', 'my_custom_change_column_name', 10, 3); function my_custom_change_column_name($arr, $form_id){ if( $form_id == 105){ $arr['first_name'] = 'my_custom_name'; } return $arr; } |
Note: It saves forms only.
$79 for an unlimited installation. No monthly or yearly fees.