Skip to content Skip to sidebar

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

Problem:
The client is using WPML with Contact Form 7 and has custom CSS styles applied to the send button on their form. However, the button 'Enviar' appears black in the Portuguese version and white in the English version because WPML doesn't copy the custom CSS styles.
Solution:
We recommend editing the translated form using the WordPress editor and manually copying the classes there. This action should ensure that the CSS is correctly added to the form on the front end.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, 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. If the problem persists, 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 5 replies, has 1 voice.

Last updated by antonioL-11 1 year, 1 month ago.

Assisted by: Osama Mersal.

Author Posts
March 13, 2025 at 4:03 pm #16812820

antonioL-11

Background of the issue:
I am using WPML with Contact Form 7 on my website hidden link. I have custom CSS styles applied to the send button on my form.

Symptoms:
The button 'Enviar' in my form is black in the Portuguese version and white in the English version. WPML doesn't copy my custom CSS styles.

Questions:
Why doesn't WPML copy my custom CSS styles for the send button in Contact Form 7?

March 14, 2025 at 9:53 am #16815583

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch )

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

Hello,

It seems the minimum requirements on the server are not met:
https://wpml.org/en/home/minimum-requirements/

Could you please increase the WordPress memory limit (WP Memory Limit) to at least 256 MB? WPML requires at least 128 MB.
Your current values ​​are:

PHP Memory Limit 256 MB
WP Memory Limit 40 MB

To do this, you need to connect to your website's server and open the wp-config.php file in a text editor. The file is located in the WordPress root directory.

Add this code to the wp-config.php file to increase WordPress's memory:

define ('WP_MEMORY_LIMIT', '256M');

Add this just before this comment:

// That's all, stop editing! Happy blogging.

The current values ​​can be viewed under WPML > Support > WordPress.

These settings can be restricted directly by your hosting provider. Therefore, I recommend contacting them and asking them to change them directly if the changes are not applied immediately.

---

If adjusting the limit does not solve the issue, please let us know how you are applying the CSS changes and which selectors and properties you are using.

In case you actually made the design changes on the form edit, then you will need to update the form's translation to see the changes.

Best regards,
Andreas

March 14, 2025 at 11:11 am #16816182

antonioL-11

Hello Andreas,

I alreday fix the settings for PHP and WP Memory Limits.

Now they are:

PHP Memory Limit 256 MB
WP Memory Limit 256 MB

My CF7 code is :

<label> Nome
[text* your-name] </label>

<label> E-mail
[email* your-email] </label>

<label> Assunto
[text* your-subject] </label>

<label> A sua mensagem (opcional)
[textarea your-message] </label>

[acceptance accept-this-1] Autorizo o tratamento dos meus dados aqui fornecidos, de acordo com a Política de Privacidade. [/acceptance]

[submit

class:wp-block-button
class:wp-block-button__width-50
class:wp-block-button__link
class:botao-enviar

"ENVIAR"]

The only custom css I'm using are the classes for the button.
I also clicked on Translate Link Targets, to adjust links. And nothing change in the english page. Any clue for what might be going on?

Best regards.
Rui

Screenshot 2025-03-14 at 11.04.51.png
March 16, 2025 at 4:27 am #16820989

Osama Mersal

Hi Rui,

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

First of all, sorry for the late reply; it was due to a higher workload.

Please log in to this hidden link and import your form. After that, please translate it to replicate the issue.

If the issue is replicable, please let me know how to reproduce it so I can check it and consult our compatibility team.

Best regards,
Osama

March 17, 2025 at 3:44 pm #16826173

antonioL-11

Hello Osama,

I copied my form to your sandbox.

I'am using twenty twenty five theme a Block wordpress theme, and in your sandbox we are using the twenty twenty one theme a Classic theme. I copy my custom CSS, with little changes because of different themes. I add border-radius to 20px.

The problem is the same, the classes in our "formulario português" are not being copied to the translated form.

Best regards
Rui

Screenshot 2025-03-17 at 15.43.29.png
Screenshot 2025-03-17 at 15.43.16.png
March 17, 2025 at 8:42 pm #16827200

Osama Mersal

Hi Rul,

Thanks for replicating the issue. I was able to fix the issue by editing the translated form using WordPress editor and copying the classes there. (hidden link)

After that, the CSS is added correctly to the form on the front end. (hidden link)

Best regards,
Osama

March 18, 2025 at 6:39 pm #16832082

antonioL-11

Many Thanks Osama!

Top Bar choose english and edit the form, Great!

Beste Regards
Rui