Support

Account

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
    )