Support

Account

Home Forums General Issues Using a new custom field setting

Solved

Using a new custom field setting

  • I have a form that I’d like to display in different languages.
    So I created a new field setting called “Label spanish” thanks to the documentation

    Is there a way to display the correct label on the frontend depending on the language? Something like :

    
    if($language == 'es') {
    $label = 'label_es';
    }
    else {
    $label = 'label';
    }
    
    acf_form(array(
    	'post_title'    => false,
    	'post_content'  => false,
    	'submit_value'  => __('Update meta'),
    	'label_to_display' => $label,
    ));
    
    
  • Use the acf/prepeare_field filter and change $field[‘label’].

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.