Skip to content Skip to sidebar

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

Problem:
If you're experiencing issues with forms built in Elementor on a multilingual website not submitting unless logged in as an admin, this might be due to a compatibility issue between WPML and Elementor.
Solution:
We recommend the following steps to diagnose and potentially resolve the issue:
1. Ensure you have a backup of your site.
2. Disable all plugins except for WPML and Elementor.
3. Switch to a WordPress default theme.
4. Test if the issue still occurs, particularly on translated pages.
If the problem persists, it could be related to how WPML handles AJAX requests on translated forms. We found that adding the following code to your theme's

functions.php

file can resolve the issue:

add_action( 'wp_ajax_elementor_pro_forms_send_form', 'wssupp_set_language_ajax_form', 9 );<br />add_action( 'wp_ajax_nopriv_elementor_pro_forms_send_form', 'wssupp_set_language_ajax_form', 9 );<br />function wssupp_set_language_ajax_form(){<br />    $id = $_POST['post_id'];<br />    $post = get_post($id);<br />    $lang = apply_filters( 'wpml_element_language_code', NULL, ['element_id' => $id, 'element_type' => $post->post_type] );<br />    $current_language = apply_filters('wpml_current_language', NULL );<br />    if ( $lang != $current_language ) {<br />        do_action( 'wpml_switch_language', $lang );<br />    }<br />}

Please check if this resolves the issue. If you update your theme, you may need to re-add this code unless it's included in a future WPML release. Using a child theme can prevent the loss of custom code on theme updates.

If this solution does not apply to your case, or if it becomes outdated, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.

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 6 replies, has 0 voices.

Last updated by Dražen 2 weeks, 5 days ago.

Assisted by: Dražen.

Author Posts
September 12, 2025 at 9:43 am #17396969

samD-19

Background of the issue:
I am trying to resolve an issue with forms built in Elementor on a multilingual website (Dutch–French, WPML). The forms do not submit unless the user is logged in as admin. This issue occurs on both the Dutch and French versions of the website. I have disabled all caching plugins, cleared server/CDN cache, and removed reCAPTCHA from the forms, but the issue remains. The forms display correctly, but the submission fails. I am wondering if this could be related to WPML’s integration with Elementor forms. Link to a page where the issue can be seen: hidden link

Symptoms:
Forms built in Elementor do not submit unless the user is logged in as admin. Logged-out or incognito users cannot submit, no entries show in the submissions backend, and the redirect after submission is not triggered.

Questions:
Could this be a known compatibility issue with WPML’s integration with Elementor forms?
Can you guide us in debugging further?

September 12, 2025 at 9:57 am #17397007

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

let me know once the staging is ready, please try next:

- Make sure you have a backup.
- Disable all other plugins and leave active only WPML plugins and Elementor
- Switch to WP default theme
- Check if the issue still happens.

If yes, and it happens only on translated page please share access so I can further check.

Regards,
Drazen

September 15, 2025 at 6:32 am #17400716

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks, but I can not do changes and debugging on live website, it is not safe as many things can go wrong.

Since you already have staging site, please share access to staging site and URL of page where I can see the issue, and I will check and debug the issue further.

Thanks,
Drazen

September 15, 2025 at 6:44 am #17400772

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks.

Can you please explain how can I see the issue?

I went to hidden link as not logged in visitor and tested and form was summited without any issue.

Regards,
Drazen

September 15, 2025 at 6:48 am #17400774

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

okay, I have seen the issue and found that it is a known issue, and we are working in permeant fix.

I have added next code in functions.php, and it seems to work fine now. Please check.

add_action( 'wp_ajax_elementor_pro_forms_send_form', 'wssupp_set_language_ajax_form', 9 );
add_action( 'wp_ajax_nopriv_elementor_pro_forms_send_form', 'wssupp_set_language_ajax_form', 9 );
function wssupp_set_language_ajax_form(){

	$id = $_POST['post_id'];
	$post = get_post($id);
	
	$lang = apply_filters( 'wpml_element_language_code', NULL, ['element_id' => $id, 'element_type' => $post->post_type] );

	$current_language = apply_filters('wpml_current_language', NULL );

	if ( $lang != $current_language ) {
		do_action( 'wpml_switch_language', $lang );
	}
}

Regards,
Drazen

September 15, 2025 at 7:05 am #17400799

samD-19

Hi,

It does seem to work, feel free to implement it on the live environment.

Can you briefly explain the problem?
When we perform updates to the website, do we have to add this again and again?

Thank you!

September 15, 2025 at 7:10 am #17400802

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

I have added the same code to the end of your functions.php theme.

The issue seems to be caused if you manually edit the translated page / form.

If you update your theme, then you need to add same code yes, if it is not being fixed in WPML release. In such cases, this is why child theme is suggested to be used, so you can add any change you wish, and it is not removed when you update parent theme. Maybe you can check on this with your developer and if you wish implement child theme.

Regards,
Drazen