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.

This topic contains 3 replies, has 2 voices.

Last updated by Mohamed Sayed 10 months, 1 week ago.

Assigned support staff: Mohamed Sayed.

Author Posts
October 3, 2021 at 4:57 pm #9712037

aarniH

Tell us what you are trying to do?
I translated the Contact Us Form according to the official WPML guide but the conditional fields won't work on the translated page because I am not able to translate the conditional fields. English is the original language that works but France is the translated page that doesn't work. Could you please advise how to translate the conditional fields?

Is there any documentation that you are following?
https://wpml.org/documentation/related-projects/using-contact-form-7-with-wpml/

Is there a similar example that we can see?

What is the link to your site?
hidden link

Best regards
Tim

October 4, 2021 at 1:48 pm #9716689

Mohamed Sayed
Supporter

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

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

Hi Tim,

Please try the following and let me know if it works:

1- Go to WPML -> Settings -> Custom XML Configuration (tab)

2- Add this code and save:

<wpml-config>
    <custom-fields>
        <custom-field action="copy">wpcf7cf_options</custom-field>
    </custom-fields>
</wpml-config>

3- Check if the issue is resolved with the translated form

Regards,
Mohamed

October 4, 2021 at 9:09 pm #9719173

aarniH

Hi Mohamed,

Thank you very much for the reply.

I see, so I can NOT use the Translator Editor to translate the Conditional Fields for Contact Form 7 By Jules Colle.

It seems that the only way to translate the fields is to use the contact form editor itself after the XML action has copied the fields. This would have been great information in the official WPML CF7 guide.

In my case, the XML “copy” action doesn’t work as it copies the fields in English and will keep in synchronisation with it. I need to use the “copy-once” action so after the copy I can translate the copied fields to another language and it will not sync over with the original language.

<wpml-config>
    <custom-fields>
        <custom-field action="copy-once">wpcf7cf_options</custom-field>
    </custom-fields>
</wpml-config>

Please also note that after you add this code snippet, you need to resave the translation in the Translator Editor, otherwise the conditional fields are not copied.

October 5, 2021 at 9:31 am #9721919

Mohamed Sayed
Supporter

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

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

Hi,

Thanks for sharing the above information and I'm glad to hear that the issue is fixed now. Please note that the Conditional logic is added by the Fields for Contact Form 7 plugin By Jules Colle which is not officially compatible with WPML, you can check the list of compatible plugins from here: https://wpml.org/plugin/ and this is why it's not added in the official WPML CF7 guide.

It would be great if you could contact the plugin author and urge them to join our Go Global Program. You can find details about it here:
https://wpml.org/documentation/support/go-global-program/
We will be happy to cooperate with them in making their plugin officially compatible with WPML.

Regards,
Mohamed