Home › Forums › ACF PRO › acf_form field instructions translations › Reply To: acf_form field instructions translations
Hi,
If I write instructions without qtranslate tags (a simple normal text in one language) on front end it looks perfect.
The string which I’ve insert doesn’t have extra or converted chars.
so writing:
(name and number of street)
works as expected.
instead writing:
[:it](nome e numero della strada)[:en](name and number of street)[:fr](nom et numéro de la rue)[:]
won’t works.
I think is breaking something inside field rendering because I get this result when I do a print_r
of the field:
Array
(
[ID] => 484
[key] => field_556d8c8ddc6bc
[label] => indirizzo
[name] => indirizzo
[prefix] =>
[type] => text
[value] =>
[menu_order] => 5
[instructions] =>
[required] => 0
[id] =>
[class] =>
[conditional_logic] => 0
[parent] => 469
[wrapper] => Array
(
[width] =>
[class] =>
[id] =>
)
[_name] => indirizzo
[_input] =>
[_valid] => 1
[default_value] =>
[maxlength] =>
[placeholder] =>
[prepend] =>
[append] =>
[readonly] => 0
[disabled] => 0
)
but $field['instructions']
is not empty! It’s filled with:
[:it](nome e numero della strada)[:en](name and number of street)[:fr](nom et numéro de la rue)[:]
and also $field['wrapper']
settings are lost
The really strange behavior is that:
if form is submitted (so after a POST request) it works as expected.
Array
(
[ID] => 484
[key] => field_556d8c8ddc6bc
[label] => indirizzo
[name] => indirizzo
[prefix] =>
[type] => text
[value] =>
[menu_order] => 5
[instructions] => (nome e numero della strada)
[required] => 1
[id] =>
[class] =>
[conditional_logic] => 0
[parent] => 469
[wrapper] => Array
(
[width] => 50
[class] =>
[id] =>
)
[_name] => indirizzo
[_input] =>
[_valid] => 1
[default_value] =>
[placeholder] =>
[prepend] =>
[append] =>
[maxlength] =>
[readonly] => 0
[disabled] => 0
)
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!
🚨 The 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5
— Advanced Custom Fields (@wp_acf) May 18, 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.