Problem:
For a Dutch WordPress website, I use the Contact Form 7 plugin to collect event registrations. Completed forms are stored in the database using the Advanced Contact Form 7 DB plugin. This way they can be easily exported back to CSV. But this plugin also supports WordPress shortcodes so that I can display the registrations in a table on the front-end of the website.
But since I have upgraded Advanced Contact Form 7 DB to 2.0.2 or newer to much data is shown. In the shortcode I have added 3 colomns that I want to show. But all colums are shown. This is not good because on the event registration form also personal details are asked that we don’t want to share with the other visitors.
Another problem is that all data from other forms, including all columns, are also shown after the list of registrations from the current form.
I use this shortcode that is causing problems:
[acf7db form_id='689' id='afmelders' show='689.Naam, 689.Tussenvoegsels, 689.Achternaam']
Solution:
Apparently the problem is in the form id I used in the shortcode. This is not the unique id that Contact Form 7 gives to a form. It is a unique value consisting of letters and numbers. You can find this in the wp-admin environment in the forms overview. Look in the “shortcode” column.
The correct shortcode is:
[acf7db form_id='8d746e3' show='8d746e3.Naam, 8d746e3.Tussenvoegsels, 8d746e3.Achternaam']
And the 2 problems mentioned earlier are solved. Apparently this was something that is changed in plugin code in 2.0.2.
Tested on:
WordPress 6.7.1 with Contact Form 6.0.3 and Advanced Contact form 7 DB 2.0.6