Skip Navigation

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

Problem:
The client is using the Divi Contact Form Helper plugin and has identified certain fields that are not available for translation in the WPML Advanced Translation Editor. These fields include Description, Placeholder text, HTML field, and various fields within the Confirmation Email settings.

Solution:
We provided a Custom XML Configuration to make the missing fields translatable. The client should add the following code to WPML > Settings > Custom XML Configuration:

<wpml-config>
  <shortcodes>
    <shortcode>
      <tag>et_pb_contact_field</tag>
      <attributes>
        <attribute>field_title</attribute>
        <attribute>field_placeholder</attribute>
        <attribute>field_description</attribute>
        <attribute encoding="allow_html_tags">field_htmlcontent</attribute>
      </attributes>
    </shortcode>
  </shortcodes>
</wpml-config>

After adding the code, the client should re-translate the page. Additionally, we reminded the client not to forget to translate URLs, providing a link to our documentation on this topic:

If the provided solution does not apply due to being outdated or not relevant to the client's specific case, we recommend opening a new support ticket. We also highly suggest checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that the latest versions of themes and plugins are installed.

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

Last updated by Dražen 8 months, 2 weeks ago.

Assisted by: Dražen.

Author Posts
April 10, 2024 at 1:36 pm #15505238

victorD-16

I'm using the plugin Divi Contact Form Helper to create forms on for example: hidden link

However, there are a few fields that's not available for translation in the Advanced Translation Editor. I know that this can be solved with the Custom XML Configuration but I can't just get my head around it. Could you please help me?

I've pointed out the fields in the attached screenshot.

Ps. I found https://wpml.org/forums/topic/text-of-new-plugin-not-found-to-translate/ and added that XML, but there are more fields missing.

divi-forms-wpml.jpeg
April 11, 2024 at 11:17 am #15508745

Dražen
Supporter

Languages: English (English )

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

Hello,

that plugin is not officially on our list and probably needs additional configuration to be translatable. We can help with a few, but it would be also good to invite the author to our compatibility program so we can together make it WPML compatible:

- https://wpml.org/documentation/support/go-global-program/

As for your issue, I can take a look and help out with XML code. I created a minimal installation of WordPress, WPML, and all necessary WPML add-ons.

You can access the WordPress dashboard using the link below:
- hidden link

Kindly follow the steps below:
- Set up WPML
- Install the necessary plugins.
- Try to replicate the issue with simple example
- Share with me step by step guide on how can I check the issue

Regards,
Drazen

April 11, 2024 at 12:39 pm #15509245

victorD-16

Amazing, thanks! I will for sure contact the plugin developer and ask him to join your program.

I've installed everything and added a form on this page: hidden link

There are a few form fields that are not available for translation in the WPML Advanced Translation Editor. Please see the attached image.

* Description
* Placeholder text
* HTML field (this is a free text TinyMCE editor)
* Confirmation email (this is not visible onpage but can be found in the Contact Form module under Settings » Content » Confirmation Email). I've tried to add this in the Custom XML settings but I can only see the Email Subject in the Translation Editor. These fields are missing from the confirmation email:

- Email Address Field ID
- Confirmation Email From Name
- Confirmation Email From Email Address
- Confirmation Email Message

divi-forms-wpml.jpeg
April 11, 2024 at 1:36 pm #15509550

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks for getting back, I have exported your page to JSON and checked the page builder shortcodes and add correct XML.

Add next code to WPML > Settings > Custom XML configuration

<wpml-config>
  <shortcodes>
    <shortcode>
      <tag>et_pb_contact_field</tag>
      <attributes>
        <attribute>field_title</attribute>
        <attribute>field_placeholder</attribute>
        <attribute>field_description</attribute>
        <attribute encoding="allow_html_tags">field_htmlcontent</attribute>
      </attributes>
    </shortcode>
  </shortcodes>
</wpml-config>

and re-translate your page.

Do not forget to translate URLs:

- https://wpml.org/announcements/2020/02/translating-links-with-advanced-translation-editor/

Regards,
Drazen

April 11, 2024 at 2:30 pm #15509832

victorD-16

Thanks! How can I combine your XML with my existing custom XML? I've tried to combine them but they have different tags and I just get error messages when I try to merge them.

<wpml-config>
<shortcodes>
<shortcode>
<tag>et_pb_contact_form</tag>
<attributes>
<attribute>title</attribute>
<attribute>title_tablet</attribute>
<attribute>title_phone</attribute>
<attribute>email</attribute>
<attribute>custom_message</attribute>
<attribute>success_message</attribute>
<attribute>confirmation_email_subject</attribute>
<attribute>confirmation_message_richtext</attribute>
<attribute>confirmation_email_message</attribute>
<attribute>confirmation_email_field_id</attribute>
<attribute>confirmation_email_from_name</attribute>
<attribute>confirmation_email_from</attribute>
<attribute>submit_button_text</attribute>
<attribute>submit_button_text_tablet</attribute>
<attribute>submit_button_text_phone</attribute>
<attribute type="media-url">background_image</attribute>
<attribute type="link">redirect_url</attribute>
</attributes>
</shortcode>
</shortcodes>
</wpml-config>

Also, I wonder of this should be in the et_pb_contact_field instead of the et_pb_contact_form tag?

<attribute>confirmation_email_field_id</attribute>

ec63c6f0-486a-4ef7-8d36-cb34bf79ce99.jpeg
April 12, 2024 at 6:18 am #15511388

Dražen
Supporter

Languages: English (English )

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

Hello,

you just add and continue the <shortcode> part, that is the one that holds information, other part is the same

<wpml-config>
<shortcodes>
<shortcode>
<tag>et_pb_contact_form</tag>
<attributes>
<attribute>title</attribute>
....
</attributes>
</shortcode>
<shortcode>
<tag>et_pb_contact_field</tag>
<attributes>
<attribute>title</attribute>
</attributes>
</shortcode>
</shortcodes>
</wpml-config>

et_pb_contact_field and et_pb_contact_form, are not the same shortcode, so you shouldn't add that one to another, it is different widget on your page / Divi builder.

Regards,
Drazen

April 12, 2024 at 8:13 am #15511817

victorD-16

Thanks, now we are really close. I noticed that the options for Radio buttons, Checkboxes and Dropdowns/Selects were not available for translation. I tried to add these attributes but it looks fishy in the translation editor. Is there a better way to add these fields? See the attached image.

URL: hidden link

XML used:

<wpml-config>
<shortcodes>
<shortcode>
<tag>et_pb_contact_form</tag>
<attributes>
<attribute>title</attribute>
<attribute>title_tablet</attribute>
<attribute>title_phone</attribute>
<attribute>email</attribute>
<attribute>custom_message</attribute>
<attribute>success_message</attribute>
<attribute>confirmation_email_subject</attribute>
<attribute>confirmation_message_richtext</attribute>
<attribute>confirmation_email_message</attribute>
<attribute>confirmation_email_from_name</attribute>
<attribute>confirmation_email_from</attribute>
<attribute>submit_button_text</attribute>
<attribute>submit_button_text_tablet</attribute>
<attribute>submit_button_text_phone</attribute>
<attribute type="media-url">background_image</attribute>
<attribute type="link">redirect_url</attribute>
</attributes>
</shortcode>
<shortcode>
<tag>et_pb_contact_field</tag>
<attributes>
<attribute>field_title</attribute>
<attribute>checkbox_options</attribute>
<attribute>radio_options</attribute>
<attribute>select_options</attribute>
<attribute>field_placeholder</attribute>
<attribute>field_description</attribute>
<attribute encoding="allow_html_tags">field_htmlcontent</attribute>
</attributes>
</shortcode>
</shortcodes>
</wpml-config>

wpml-options.jpg
April 12, 2024 at 8:23 am #15511891

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks.

I have checked and I am afraid that they are saved in Divi page builder like that, nothing much from WPML we can do.

You can contact the plugin author and ask them to encode them differently and etc.

Regards,
Drazen

Screenshot_1.jpg
April 12, 2024 at 8:25 am #15511910

victorD-16

Got it, thanks for helping out!