Background of the issue:
I am using WPForms integrated with WPML to create a form that is translated into English and French. I want the form to display labels in the appropriate language but store consistent return values in the 'entries' table for easier data analysis.
Symptoms:
The 'entries' export table contains mixed language values ('Yes', 'Oui') for radio box fields and creates new columns for checkbox responses, complicating data analysis. This seems unintuitive and isn't the 'expected behaviour' when translating forms.
Questions:
How can I keep WPML from adjusting the select values for the form and only replace the display labels?
Is 'string translation' translating every matching string in the page source?
Is there any way to adjust the string-replacement to avoid values and replace only labels?
Once submitted, do I need to effectively re-translate the submitted values before they're stored?
Welcome to WPML support. From what I understand the values of the checkboxes or radio buttons are exposed in the Advanced Translation Editor.
So if you use the automatic translation or you translated those values, it will show as translated.
One thing that you can do is to make a small change in the form in the original language and then send the form for translation again and go to the advanced translation editor to check and see if the values show there. If so, please copy the value from English to French instead of translating it.
That should do the trick for you for future entries, but for the current entries there is nothing that can be done from GUI, and you need to use a MySQL query to make the changes in the database to change those items.
Thank you, Christopher — your response is greatly appreciated! I totally understand about not resolving past entries/submissions and needing to clean up the entries table. Not a concern.
As for the Advanced Translation Editor, I made sure it was enabled and went and edited the form. I couldn't see an option to adjust values, so I even added a new value (maybe) in the attached screenshot, but there's still nowhere that the label and value are distinct. When I select "Voiture/véhicule" in the editor, none of the options to the right (in the yellow rectangle) seem to permit editing the selection value. [I also made sure that "Choices / Value #5" isn't somewhere else in ATE.]
Thank you for the reply. I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.
Make sure you set the next reply as private.
Also please tell me where I can see the front end.
Meanwhile, I am working on creating a new WordPress installation with WP Forms and WPML to compare that installation with yours by adding a form there and see if the values are translated there as well or only the labels.
From the screenshots you shared the Advanced Translation Editor only gives you the option to translate the labels, which sounds logical.
But we need to compare to know what will be the behavior for the values.
You also can access the WordPress installation I created:
Thank you for your patience, upon testing a form on the clean installation below:
hidden link
I found out that the values are translated as well as the labels:
Here you can see a French page with the form and the values are also translated:
hidden link
So this is the default behavior. The idea behind this is that you will have two separate forms for each language.
So I understand that for your use-case it is not ideal as you want an aggregate of the data regardless of the language.
What you can do is post processing the data by changing the values back to English on the CSV file or whatever export that you have and create a script to run that each time you export the data.