Home › Forums › Add-ons › Flexible Content Field › Flexible content sub_field issues › Reply To: Flexible content sub_field issues
Hello,
I have a site in wordpress with wpml and acf plugins.
I have a custom field group in my site and i have included some custom fields inside it with various types (text, image, text area etc). One of them is type Flexible Content and i have defined 2 text sub_fields inside it. The issue that i have come across, is when i try to retrieve data from this sub_field in any language except of english, it is returned the key name not the absolute name i have set in these fields.
For example
These are the the properties of my sub-field of flexible content field
{
“key”: “field_63d3e86dc6b86”,
“label”: “Title”,
“name”: “title”,
“aria-label”: “”,
“type”: “text”,
“instructions”: “”,
“required”: 0,
“conditional_logic”: 0,
..
etc. }
In english i have this data returned as below (as i wanted to be)
[//flexible content field
{
“acf_fc_layout”: “”,
“title”: “test”, //text sub-field with name title
“image”: “test1”, //text sub-field with name image
}
],
In any other language:
{
“acf_fc_layout”: “”,
“field_63d3e86dc6b86”: “test”, //instead of title is returned field_63d3e86dc6b86
“field_63d3e86dcd5”: “test1”,//instead of image is returned field_63d3e86dcd5
}
],
I have not figured out why this happening, as i have set the same sub_field names in all languages.Any ideas? Thanks in advance!!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Accordions are a great way to group related information while allowing users to interactively show and hide content. In this video, Damon Cook goes in-depth on how to create an accessible accordion block using ACF PRO’s Repeater field.https://t.co/RXT0g25akN
— Advanced Custom Fields (@wp_acf) March 2, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.