Skip Navigation

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.

Elementor users - please update WPML to the latest version to maintain compatibility. More details here - https://wpml.org/changelog/2024/12/wpml-4-6-15-critical-update-for-elementor-sites/
Sun Mon Tue Wed Thu Fri Sat
9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+02:00)

Tagged: 

This topic contains 5 replies, has 1 voice.

Last updated by Osama Mersal 3 days, 16 hours ago.

Assisted by: Osama Mersal.

Author Posts
December 28, 2024 at 9:53 am #16549805

antoniusH

Background of the issue:
I am trying to fix an issue with the GravityForms styling when the GravityForms MultiLingual plugin is active. In the file gravityforms-multilingual/inc/gravity-forms-multilingual.class.php, there is a filter being added: add_filter( 'gform_pre_render', [ $this, 'gform_pre_render' ] );. The gform_pre_render makes a single call to return $this->translate( $form );. However, something in that function breaks the wrapper of the GravityForm. It removes the data-form-index="0" attribute somehow, causing the inline CSS to be disregarded. Commenting out that filter brings back the data-index attribute, and thus fixes the styling. Link to a page where the issue can be seen: hidden link

Symptoms:
The GravityForms lose styling when the GravityForms MultiLingual plugin is active. The data-form-index="0" attribute is removed, causing the inline CSS to be disregarded.

Questions:
Why does the gform_pre_render function remove the data-form-index attribute?
How can I fix the styling issue without commenting out the filter?

December 28, 2024 at 11:58 am #16549943

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Could you please try to recreate this issue on the following sandbox, so that we can confirm if we are handling a general bug:

One-Click-Login:
hidden link

Please leave us a comment on this ticket once you are done with this task.

Best regards
Andreas

December 29, 2024 at 10:14 am #16550919

antoniusH

Thanks for the reply! I recreated the issue in the sandbox. If you visit the sample page at hidden link, the form wrapper is also missing the data-form-index="0" attribute and thus my styling is lost. If I deactivate the GravityFroms Multilingual plugin, the attribute (and the styling) is back -- in this case, styling refers simply to the background color of the submit button.

December 30, 2024 at 10:01 am #16552723

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

I'm Osama from WPML forums support. I'll be glad to help you today.

Thanks for replicating the issue. Please let me know how the button background is added.

Best regards,
Osama

December 30, 2024 at 10:06 am #16552732

antoniusH

Hi Osama!

It's a block setting on the form when editing the page: hidden link

You can find it under the panel `Button Styles`. The color property label is `Background` over there.

December 30, 2024 at 10:50 am #16552936

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for your reply. I'll consult our compatibility team and update you as soon as they reply.

Best regards,
Osama