Back to Community

How to Customize Columns in the Contact Form 7 Database Addon (CFDB7)

12 threads Sep 16, 2025 PluginContact form 7 database addon – cfdb7

Content

Many users of the Contact Form 7 Database Addon – CFDB7 want to customize the columns displayed on the main admin subpage. A common request is to show more than the default four columns or to choose which specific fields are displayed. This article explains the plugin's default behavior, the reasons behind it, and the methods available for customization.

The Default Column Behavior

By design, the CFDB7 plugin displays a maximum of four columns from your form fields on its main admin listing page, followed by a fifth column for the submission date. This limit is hardcoded into the plugin's admin-subpage.php file. According to responses from the plugin's team in various support threads, this limitation was implemented primarily to maintain a responsive and clean design that works well on various screen sizes.

Why You Can't See Your Desired Fields

The four columns shown are automatically populated based on the position of the fields in your Contact Form 7 form. The plugin takes the first four fields it encounters. If your most important identifying fields (like an email address or a product name) are not within the first four positions of your form, they will not appear as columns on the main list. You will need to click on each individual entry to see the complete submission details on the detail view page.

Common Solutions and Workarounds

1. Reorder Your Form Fields

The simplest solution, which requires no code changes, is to reorder the fields in your Contact Form 7 form. Move the fields you want to see as columns on the main list into the first four positions. This is the method officially suggested by the CFDB7 team in support threads.

2. Modify the Plugin's Source Code (Advanced)

Warning: Modifying core plugin files is generally not recommended. Any changes you make will be overwritten the next time the plugin is updated, requiring you to reapply the modification.

If you understand this risk and wish to proceed, you can change the hardcoded column limit. This involves editing the file wp-content/plugins/contact-form-cfdb7/inc/admin-subpage.php.

  1. Access your website's files via FTP or your hosting provider's file manager.
  2. Navigate to the plugin directory and open inc/admin-subpage.php for editing.
  3. Find line ~153, which contains the code: if ( sizeof($columns) > 4) break;
  4. You can change the number 4</code to a higher value (e.g., 5 or 6) to show more columns. Alternatively, you can comment out the line entirely by placing two forward slashes at the beginning (//if ( sizeof($columns) > 4) break;). This will show all form fields as columns, though this may impact page loading performance for forms with many fields.
  5. Save the file and upload it back to your server.

3. Performance Consideration

As highlighted in one support thread, the method used to generate the columns in the admin subpage can create a high number of database queries, which may slow down the page. If you choose to show a large number of columns or have a very high number of form submissions, you may experience performance issues. The code modification suggested in the thread to cache the column data is a complex development task best handled by a experienced developer.

Official Feature Requests

Many users have requested more flexible solutions, such as:

  • A filter hook to override the column limit without editing core files.
  • A settings panel to select which specific fields to display as columns.
  • Enabling the native WordPress "Screen Options" tab to choose the number of entries per page and possibly columns.

These are not currently features of the free version of the plugin. Users are encouraged to monitor the plugin's official channels for any future updates that may include this functionality.

Conclusion

While the four-column limit is a conscious design and performance choice by the CFDB7 team, users have options. For a quick fix, reordering form fields is the safest method. For those with technical expertise, code modification is a possible workaround, albeit one that comes with maintenance and potential performance trade-offs. The community continues to provide feedback, hoping for more built-in customization options in future versions.