Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing issues with incorrect repeater field labels in confirmation emails when using WPForms with the WPForms Multilingual plugin, such as seeing labels like 'Field ID #6_2' instead of the correct form labels.
Solution:
We recommend following these steps to resolve the issue:
1. Ensure you back up your site for safety.
2. Navigate to

/wp-content/plugins/wpml-wpforms/classes/Hooks/WpForms/Notifications.php

and locate line number 92.
3. Replace the existing code:

$field['name'] = $formPostFields[ $key ]['label'];

with:

$field['name'] = $formPostFields[ $key ]['label'] ?? $field['name'];

This change should correct the label display in your confirmation emails. Please try this solution and let us know the results.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please do not hesitate to open a new support ticket at WPML support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: ,

This topic contains 0 replies, has 0 voices.

Last updated by Noman 1 month ago.

Assisted by: Noman.

Author Posts
February 13, 2025 at 1:31 pm

andreasH-126

Background of the issue:
I am trying to use a WPForms form on a site with WPML and the WPForms Multilingual plugin active that uses repeater fields. The issue can be seen on this page: hidden link (but only in the confirmation email sent to the submitter and to the admin). I expected to see the repeater fields with correct form labels in the confirmation email, similar to the thank you page and CSV export.

Symptoms:
Instead of the correct form labels, I got repeater field labels that look like this: Field ID #6_2, Field ID #7_2, Field ID #8_2.
Here's a detailed screen recording: hidden link

If I disable WPForms Multilingual plugin, the bug disappears.

Questions:
Why are the repeater field labels incorrect in the confirmation email?
How can I ensure the correct form labels appear in the confirmation email?
Is there a fix for the WPForms Multilingual plugin planned?

February 13, 2025 at 2:38 pm
February 16, 2025 at 2:00 am #16710009

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I have escalated this issue to our 2nd tier support for further review and I will update you as soon as I have some news.

Thank you for your cooperation and patience.

February 18, 2025 at 5:03 pm #16720341

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Our 2nd tier support has reviewed and provided a workaround as follows:

1. Take a backup of your site first for safety reasons.
2. Replace the below code:

$field['name'] = $formPostFields[ $key ]['label'];

With:

$field['name'] = $formPostFields[ $key ]['label'] ?? $field['name']; 

From /wp-content/plugins/wpml-wpforms/classes/Hooks/WpForms/Notifications.php at line no. 92.

I’ve tested it on a fresh WP site and it seems to be working correctly. Could you please give it a try and let us know the results?

Thank you for your time reporting the issue.

February 25, 2025 at 4:12 pm #16746913

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I just wanted to follow up and check if you had a chance to try the workaround we provided. Did it resolve the issue on your end?

Please let us know if you need any further assistance.

Looking forward to your update

Thank you