You have to
(1) go into your form definition (Contact -> Edit) and change the name of the field to what you want (this covers all future submissions)
(2) update the field name in the DB (this covers all past submissions)
—-
(1) So if you have in your Contact Form 7 Definition something like:
Your Choice: [radio radio-450 "first" "second" "third"]
Just change the “radio-450” to be whatever you want (say your-choice
), just be sure there are no spaces. The text in front of the form element (“Your Choice”) does not get submitted with the form. That is just for display. So when the form gets posted, it only know “radio-450=first” was what the user selected, for example. And my plugin saves that in the DB.
Aside: Remember that if you renamed radio-450
then you also should change that in the email Message Body section (where it appears as [radio-450]
) so that the email that gets sent to you includes that information. (Although this is irrelevant to my plugin)
(2) If you have existing form submissions where the field is named radio-450
and you change the form definitions to say your-choice
and get some new submission, then when you look at the table, you will see a column for both. Old ones will have the data in radio-450
while new ones will have data in your-choice
. If you want to change the old ones, then you actually have to go into the DB and make a SQL query. This would be:
update wp_CF7DBPlugin_SUBMITS set field_name = 'your-choice' where field_name = 'radio-450'