Instructions Tooltip

A new instructions placement let you display instuctions in a tooltip. It can be selected in the “Instructions Placement” field group setting.

Set Settings in PHP

It is possible to set this setting in PHP using the acf/load_field_group hook. Note that this hook is used everywhere, including in ACF admin and tools screen. Which means the setting will be used when exporting the field group.

To avoid that behavior, you can use the acfe_is_admin_screen() function as condition. Usage example:

add_filter('acf/load_field_group', 'my_acf_field_group');
function my_acf_field_group($field_group){
    // Bail early if in ACF admin/tool screen
        return $field_group;
    // Target a specific key
    if($field_group['key'] !== 'group_5f20935b9a777')
        return $field_group;
    // Settings
    $field_group['instruction_placement'] = 'acfe_instructions_tooltip';
    // Return
    return $field_group;

Retrieve Settings

Instructions Placement settings are saved in the Field Group array, under instruction_placement key. It can be retrieved using acf_get_field_group(). Usage example:

$field_group = acf_get_field_group('group_5f20935b9a777');

 * [position] => normal
 * ...
 * [instruction_placement] => acfe_instructions_tooltip
 * ...